readelf: Handle multiple .debug_macro sections and decode header flag.
authorMark Wielaard <mark@klomp.org>
Sat, 13 Oct 2018 13:08:16 +0000 (15:08 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 19 Oct 2018 21:57:22 +0000 (23:57 +0200)
commit2f4a040fab520a97480f6ca6fa9fcef88bc55255
tree951251cfa89f26d477f973dbc6af9db36b10594d
parenteee4269e53154daaf0251371aacd91ec5db3eb30
readelf: Handle multiple .debug_macro sections and decode header flag.

In object files there could be multiple .debug_macro sections.
These are COMDAT sections used as imports. Note that the output for
DW_MACRO_import isn't ideal since the offset is printed against the
start of the .debug_macro section, but it doesn't show which one.
We currently don't have that information and no interface yet for
libdw users.

Also decode the macro header flag byte for convenience.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c
tests/ChangeLog
tests/run-readelf-macro.sh
tests/run-readelf-macros.sh [new file with mode: 0755]
tests/run-readelf-zdebug.sh
tests/testfile-macros-object.o.bz2 [new file with mode: 0644]