This is the mail archive of the libc-help@sourceware.org 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: why the DSO was loaded at address 0


On 05/21/2013 05:10 PM, Paul Pluzhnikov wrote:
On Tue, May 21, 2013 at 7:39 AM, Florian Weimer <fweimer@redhat.com> wrote:

do you know the correct way to obtain an address from dladdr()
which can be passed to addr2line?

Does "symbol - dli_fbase" not work for you?

It should.

Here's an example. The pointer is 000000376fa21a05, dli_fbase is 0000376fa00000.

"/usr/bin/addr2line -a -f -i -p -e /lib64/libc.so.6 0000000000021a05" prints:

0x0000000000021a05: ??
??:0

But addr2line works in general, as the output from "/usr/bin/addr2line -a -f -i -p -e /lib64/libc.so.6 0x000000376fa21a05" shows:

0x000000376fa21a05: __libc_start_main at ??:?

So I have to pass the in-process address to addr2line. Obviously, this breaks without prelink.

--
Florian Weimer / Red Hat Product Security Team


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