readelf: Handle .debug_str_offsets.
authorMark Wielaard <mark@klomp.org>
Mon, 30 Apr 2018 00:54:07 +0000 (02:54 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 30 May 2018 10:14:10 +0000 (12:14 +0200)
commit4ac4a42376428248f7174c7bb713fff27bb4d4b0
tree3853c641731266985a8b98a2076060bc44143bbe
parent50dfd98101dde72b32ea2d4df89166ce148a28f2
readelf: Handle .debug_str_offsets.

The .debug_str_offsets tables are indirect string offsets into the
.debug_str section. For DWARF5 they can be in both the main, skeleton
and split dwarf (.dwo) files.

For DWARF4 with the GNU DebugFission extension the tables will not have
an header and they will only be in the split DWARF (.dwo) file, never in
the main (skeleton) file.

For DWARF5 the (non-split) unit DIE will have a DW_AT_str_offsets_base
attribute pointing at the actual index (after the header). The split
unit will never have this attribute (and use the table at offset zero).

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c
tests/ChangeLog
tests/Makefile.am
tests/run-readelf-str.sh [new file with mode: 0755]