Writing a ldd like utility.

vamsi krishna vamsi.krishnak@gmail.com
Thu Jun 1 18:44:00 GMT 2006


Hello All,

I need to write some for a program which needs the virtual address
where the shared libraries (I need to enumerate each of them ) are
mapped in the virtual adress space.

o I can read the link_maps of the dynamic linker get the details of
where the shared libraries are mapped, but I'am little skeptical about
its portability (do all the linuxes and unixes have the same way to
access the link_maps ?).

o I see the there are some .dynamic sections in the elf binary, so the
information on where (virtual address) these dynamic shared libraries
are mapped is put in this section?

o Was wondering how ldd does that ? (does it fork the executable and
get the link_maps from it?)

Thank you for your comments.

Regards,
Vamsi.



More information about the Binutils mailing list