]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - binutils/readelf.c
MIPS/readelf: With `-A' also dump GOT in static binaries
authorMaciej W. Rozycki <macro@imgtec.com>
Mon, 24 Apr 2017 19:41:33 +0000 (20:41 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Wed, 26 Apr 2017 12:11:20 +0000 (13:11 +0100)
commitbbdd9a6894d7875407da59d490faf5588163d21c
treef58c3dba9123790524df71b86b69e0267aa6402a
parente63d123268f23a4cbc45ee55fb6dbc7d84729da3
MIPS/readelf: With `-A' also dump GOT in static binaries

A static, non-relocated global offset table will be embedded in static
binaries produced from objects containing any kind of GOT relocations,
generally PIC code.  All symbols will have been resolved in static link
in such binaries making all GOT entries local and their values final as
there is no run-time load processing further performed.

Dump such GOT with `readelf -A' like already done with regular GOT, to
make it easier to examine static code that uses accesses via the GOT
pointer.  There will be no dynamic segment or section in a static binary
to get the GOT pointer (DT_PLTGOT) from, so use section headers to find
a `.got' section instead.

binutils/
* readelf.c (process_mips_specific): Add static GOT support.
binutils/ChangeLog
binutils/readelf.c