Re: text base address of a library

From: David Mosberger <>
Date: 2003-09-17 09:18:12
>>>>> On Tue, 16 Sep 2003 16:05:53 -0700, Umut Aymakoglu <> said:

  Umut> Hi - Is there a way(function) to find the text base address of
  Umut> a loaded library?

  Umut> a.c: main() { b(); }

  Umut> b.c: b() {}

  Umut> %gcc -c b.c %gcc -shared -o b.o %gcc -o a a.c ./

  Umut> %ldd a ./ => ./ (0x2000000000044000) <---------- how
  Umut> can i find this address within a program?

dl_iterate_phdr() is probably what you want.  For better or worse, it
is said to be a trivial interface which requires no documentation [1].
libunwind has some sample code which may help you (see


To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Sep 16 19:18:18 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:17 EST