This is the mail archive of the
mailing list for the glibc project.
Re: why the DSO was loaded at address 0
- From: Florian Weimer <fweimer at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: Abin Xu <abin1525 at gmail dot com>, libc-help at sourceware dot org
- Date: Tue, 21 May 2013 19:58:49 +0200
- Subject: Re: why the DSO was loaded at address 0
- References: <CAFcKLwhSEyMP4J-os+ZeZG0iEcq8t26=WvMpCEMVHkBJTi04pg at mail dot gmail dot com> <CALoOobO8f8JR51dDN7vDe79KoM55PF210oTuBwCNo=2Wxht07Q at mail dot gmail dot com> <519B8737 dot 8090501 at redhat dot com> <CALoOobNFR+Oa3SfQtfe2J4NEzWLLahiOGiLNSVhd_xt0wvUKwA at mail dot gmail dot com>
On 05/21/2013 05:10 PM, Paul Pluzhnikov wrote:
On Tue, May 21, 2013 at 7:39 AM, Florian Weimer <firstname.lastname@example.org> 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?
Here's an example. The pointer is 000000376fa21a05, dli_fbase is
"/usr/bin/addr2line -a -f -i -p -e /lib64/libc.so.6 0000000000021a05"
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