why the DSO was loaded at address 0

Florian Weimer fweimer@redhat.com
Tue May 21 17:58:00 GMT 2013

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 

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

0x0000000000021a05: ??

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

More information about the Libc-help mailing list