[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Program kompileret under RedHat 6.1 vil ikke køre under RedHat 5.2



Mads Bondo Dydensborg wrote:
> 
> On Mon, 19 Jun 2000, Hanne Munkholm wrote:

> > Et program - selv en hello world program - kompileret på en standard
> > RedHat 6.1 med egcs-2.91.66, coredumper med en segmentation fault på en
> > RedHat 5.2. Lige når det starter.

> > Programmer kompileret på den gamle RedHat 5.2 med gcc version 2.7.2.3
> > virker fint på nye versioner af RedHat.


> Det lyder som inkompatibilitet mellem bibliotekerne (glibc).
> 
> Prøv at lave en ldd på binæren på begge platforme.

sslug@sslug c]$ ldd hello.rh52
        /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40015000)
        libc.so.6 => /lib/libc.so.6 (0x40023000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
sslug@sslug c]$ ldd hello.rh61      
        libc.so.6 => /lib/libc.so.6 (0x40020000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
sslug@sslug c]$ 

Blev jeg klogere af det?

 
> Det lyder dog meget underligt at hello world skulle fejle på den baggrund.


Det gør den. Lige med det samme, den når ikke engang til main().

Og se her:

sslug@sslug c]$ strings hello.rh52
/lib/ld-linux.so.2
__gmon_start__
libc.so.6
_DYNAMIC
_GLOBAL_OFFSET_TABLE_
_fini
_init
__libc_init_first
atexit
exit
printf
_environ
__environ
environ
_start
_etext
_edata
__bss_start
_end
PPRV
Hello World

sslug@sslug c]$ strings hello.rh61      
/lib/ld-linux.so.2
__gmon_start__
libc.so.6
printf
__deregister_frame_info
_IO_stdin_used
__libc_start_main
__register_frame_info
GLIBC_2.0
PTRh
Hello World

-- 
Hanne Munkholm Lund  email: sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *