Finding the path of the current binary?

Roland McGrath roland@redhat.com
Fri Mar 7 20:18:00 GMT 2003


You can use the DT_DEBUG slot or just the _r_debug symbol, to find the the
`r_map' member giving the head of the struct link_map list (see <link.h>).
Then l_name in each struct link_map gives you the file name that was opened.



More information about the Libc-alpha mailing list