bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ELF runtime loader problem


From: Greg Thompson
Subject: ELF runtime loader problem
Date: Fri, 27 Oct 2000 12:42:54 EDT

glibc 2.1.3 as distributed with Redhat 6.2:

i hope this is the correct place to report this. if not, please direct me (or simply this message) to the real right place.

i've found that the runtime linker/loader is calling the initializers in shared objects in the wrong order. rather than walking the dependency graph and initializing from the bottom up, it seems to just be calling them in whatever order they happen to be in in the objects' elf headers, or something. i'll enclose a test program that demonstrates this. it will abort() if the shared objects are initialized in the incorrect order. it's very important that these be called in the proper order, expecially for C++ shared objects that contain static instances that are constructed and destructed from within the shared objects' _init and _fini funcs.

i'll also add that FreeBSD suffered from this in the past. it was fixed in r1.47 of src/libexec/rtld-elf/rtld.c. see:

http://www.freebsd.org/cgi/cvsweb.cgi/src/libexec/rtld-elf/rtld.c

thanks.

greg

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at http://profiles.msn.com.

Attachment: testldr.tar.gz
Description: application/gzip-compressed


reply via email to

[Prev in Thread] Current Thread [Next in Thread]