This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ppc32/objdump : retrieving the symbol's name behind the GOT offset ?
- From: Alan Modra <amodra at gmail dot com>
- To: yon ar c'hall <yon dot ar dot chall at gmail dot com>
- Cc: Cary Coutant <ccoutant at google dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Sat, 11 Jan 2014 22:53:08 +1030
- Subject: Re: ppc32/objdump : retrieving the symbol's name behind the GOT offset ?
- Authentication-results: sourceware.org; auth=none
- References: <CAOJvutOWO-bzLnZQiCM9_xFjP++DKMCZ-1pEZHp_By_jyEmaNQ at mail dot gmail dot com> <CAHACq4pinZpJLbJ5_5v9Ap7VSOGmQ8sVLbDBi7kBb4z0bBz=qg at mail dot gmail dot com> <CAOJvutM1eNh99TVtxDDp70+MjK2vuwASWQWUv4cFu+qrP7z6Gw at mail dot gmail dot com>
On Sat, Jan 11, 2014 at 10:42:08AM +0100, yon ar c'hall wrote:
> On Sat, Jan 11, 2014 at 12:08 AM, Cary Coutant <ccoutant@google.com> wrote:
> >> When it's related to the access to an object via the GOT,
> >> objdump/ppc32 produces such disassembled code :
> >>
> >> lwz r9,-32764(r30)
> >>
> >> Is there any mean (with objdump, or any other tool) for quickly
> >> retrieving the corresponding real symbol's name of the targeted object
> >> (local or global) ?
> >
> > You'll need to scan the dynamic relocations for the relocation that
> > applies to that particular GOT entry. That relocation will give you
> > the symbol table index (in .dynsym) of the corresponding symbol.
> >
>
> What about local objects - hidden or default, which do not appear in
> the .dynsym ?
Look in .symtab too, for a value corresponding to the relocated GOT entry.
--
Alan Modra
Australia Development Lab, IBM