This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ld and common symbols (fwd)


Philip.Blundell@pobox.com wrote:
 > The linker issue in the message below seems to be preventing libc from 
 > building properly on my machines.  What happens is that, when building
 > ld.so, the common definition of __libc_multiple_libcs in dl-sysdep.os 
 > is no longer sufficient to stop init-first.os from being sucked into 
 > librtld.os.  This actually manifests as __libc_global_ctors being 
 > undefined when linking with ld-linux.so.2.  (Entertainingly, the deliberate
 > multiple definition of _dl_start in init-first.c doesn't seem to be doing
 > its job of preventing the link; we just end up with two _dl_start's in 
 > ld.so.  I think that is because the copy in rtld.c is defined `static'.).
 > 
 > This is with the 2.1 branch, I haven't tried 2.2.  Has anybody else come 
 > across this?
 > 
 > Thanks

Just got a same problem for SuperH port for 2.1.2.  Changing

     int __libc_multiple_libcs = 0;

in dl-sysdep.os (add the initialization = 0), as current libc does
solves the problem.

I guess that the reason is that symbol goes to .data section instead
of .common section with the initialization.
-- 
Niibe Yutaka

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]