This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Finding the path of the current binary?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]