Commit: Improve readelf's display of notes
Mon Oct 17 14:30:00 GMT 2016
I am checking in the attached patch to improve readelf's display of
notes. The patch basically does three things:
1. When the notes are extracted from a section, the name of the
section is displayed instead of an offset into the file.
2. The NT_GNU_HWCAP note is partially decoded. (Some more code is
3. When the note type/name combination is not recognised, the
contents of the description field, if any, are displayed as a
series of bytes.
2016-10-17 Nick Clifton <firstname.lastname@example.org>
* readelf.c (apply_relocations): Fail if the symbol table section
linked to by the reloc section does not have either the SHT_SYMTAB
or SHT_DYNSYM type.
(print_gnu_note): Decode the contents of NT_GNU_HWCAP notes.
Print the contents of unknown note types.
(process_note): Add the file and section to the parameter list.
Use print_symbol to display the note name.
Display the contents of unknown note types.
(process_corefile_note_segment): Rename to process_notes_at.
Add section parameter. Apply relocations to the notes when
loading from a section. Display section name when processing
notes in a section.
* testsuite/binutils-all/readelf.n: Update expected output.
More information about the Binutils