[PATCH] _dl_iterate_phdr rework
carmelo.amoroso at st.com
Tue Jan 22 14:44:39 UTC 2008
the attached patch will solve an problem when statically linking
a C++ application with gcc configured to use unwind-dw2-fde-glibc
This needs _dl_iterate_phdr to be included into libc.a instead of libdl.a,
and the implementation has been fixed to handle the static case too
(based on glibc code).
For the dynamic case, it's still present in ld.so.
Moreover, _dl_loaded_modules has been moved too (being used by
This has accomplished in the following way:
ldso/ldso/dl-elf.c: removed _dl_iterate_phdr code and include
ldso/ldso/dl-iterate-phdr.c : new file containing the fixed
ldso/ldso/dl-hash.c: removed _dl_loaded_modules definition
ldso/ldso/dl-symbols.c: included _dl_loaded_modules defintion
ldso/ldso/ldso.c: include "dl-symbols.c"
libc/misc/elf/dl-core.c: new file including dl-symbols.c and
dl-iterate-phdr.c from ldso directory
The idea is to use dl-symbols.c to keep all symbols common among ldso
(note that into the nptl branch another file dl-support.c will be added
to keep some
TLS specific functionalities that are shared between ldso and libc.a)
Thanks to Peter Mazinger for his suggestions on this topic.
Any comments are welcome.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the uClibc