readelf: Fix regression with multiple files and implicit debug_info reading.
authorMark Wielaard <mark@klomp.org>
Tue, 29 May 2018 07:44:38 +0000 (09:44 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 31 May 2018 12:20:25 +0000 (14:20 +0200)
commitc7fc54a27c0eac667f0060f277606df8208f05d7
treef4f815614409709425eb7aafdea062ffa051a7ae
parente9e64f6748499d458b951e0dcd46d6cc9d850886
readelf: Fix regression with multiple files and implicit debug_info reading.

Commit 314e9d7d "readelf: Handle .debug_info first if any other debug
section needs it" introduced a regression when handling multiple files.
The implicit and explicit printing of debuginfo weren't reset and so
the second file would not show (or scan) the .debug_info section when
needed.

Fix by resetting the implicit and explicit section printing flags.
Add a testcase that prints the .debug_loc section for two files and
check that the CUs are resolved.

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog
src/readelf.c
tests/ChangeLog
tests/run-readelf-twofiles.sh