Commit: Improve readelf's selection of file symbols for GNU build notes
Nick Clifton
nickc@redhat.com
Fri Mar 23 12:19:00 GMT 2018
Hi Guys,
I am applying the attached patch to make a couple of improvements to
readelf's selection of file symbols when display GNU build attribute
notes. The first is to skip the mapping symbols ($a, $x, etc) used
by ARM and AARCH64 targets.
The second improvement is to cope with a change in version 5 of the
annobin gcc plugin. With this version the file start symbol created
by the plugin is no longer assigned to the start of the file, as this
breaks too many other programs. Instead the file start symbol is set
to two bytes into the file. So the patches changes readelf so that if
it cannot find a symbol at the start of the file, it will look for one
two bytes into the file.
Tested with a large variety of different targets.
Cheers
Nick
binutils/ChangeLog
2018-03-23 Nick Clifton <nickc@redhat.com>
* readelf.c (get_symbol_for_build_attribute): Skip ARM mapping
symbols.
(print_gnu_build_attribute_description): If no file start symbol
could be found, look for one two bytes into the file.
* testsuite/binutils-all/note-4-64.s: Set the address of the file
start symbol to two bytes into the file.
* testsuite/binutils-all/note-4-32.s: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readelf.patch
Type: text/x-patch
Size: 4218 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180323/f912f1f3/attachment.bin>
More information about the Binutils
mailing list