incomplete symtabs via dl_iterate_phdr?

Thomas Kühne thomas@kuehne.cn
Tue Jan 2 14:59:00 GMT 2007


I am trying to find all global symbols of a programm at runtime
from within that very programm. If I use dl_iterate_phdr
and search the DT_SYMTAB sections the result is incomplete.

source:
http://svn.dsource.org/projects/flectioned/trunk/elf2.c

That way only 55 symbols are found in libc while
"nm --extern-only --defined-only libc.a" returns 2455 symbols.

Is there any way to get a list of all defined symbols, their names
and addresses at runtime?

Thomas



More information about the Binutils mailing list