Can objdump show friendly symbolic function name?

Maciej W. Rozycki macro@linux-mips.org
Thu Jul 22 11:57:00 GMT 2010


On Wed, 21 Jul 2010, Richard Sandiford wrote:

> >> It would certainly be possible to do the same thing in objdump,
> >> and FWIW, I did wonder about that when adding the readelf -A GOT dump.
> >> The problem is that, in a multi-GOT world, the annotations are only
> >> ever going to be a best guess.  If the disassembler sees:
> >> 
> >>      lw    $2,-32000(gp)
> >> 
> >> it doesn't in general know whether gp points to the primary
> >> (ABI-defined) GOT, or to some secondary GOT.  If it guesses
> >> right, the annotation would be useful, but if it guesses wrong,
> >> the annotation would be very misleading.  This is different from
> >> the current <foo> markers, which are always accurate (or at least,
> >> _should_ always be accurate).
> >
> >  Can the GOT pointer switch between GOTs within a single function?
> 
> No.

 I suppose it should be moderately easy to decode the prologue of each 
function then to see which GOT $gp refers to.

  Maciej



More information about the Binutils mailing list