]> git.ipfire.org Git - thirdparty/elfutils.git/commit
unstrip: Handle debuginfo files with missing SHF_INFO_LINK section flags.
authorMark Wielaard <mjw@redhat.com>
Wed, 29 Jul 2015 15:51:27 +0000 (17:51 +0200)
committerMark Wielaard <mjw@redhat.com>
Mon, 3 Aug 2015 11:40:56 +0000 (13:40 +0200)
commitf9fc50c3eced243c0648fb0fbfe2c9877c25e1e4
tree0ab6567bca68b1f4c6a33e1edd56c41fc24fac7d
parent3496992ae69895dfaa90e1267b7e3c88d12a50cc
unstrip: Handle debuginfo files with missing SHF_INFO_LINK section flags.

With GCC 5 there might be a .rela.plt section with SHF_INFO_LINK set.
Buggy binutils objdump might strip it from the section in the debug file.
Ignore such differences for relocation sections and put the flag back
if necessary.

Also improve the error message a little by only discarding the already
matched sections if there is an prelink undo section. Otherwise we will
report all sections as not matching if the file wasn't prelinked instead
of just the non-matching sections.

New testfiles generated by gcc5 and binutils objdump added.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/unstrip.c
tests/ChangeLog
tests/Makefile.am
tests/run-unstrip-test3.sh [new file with mode: 0755]
tests/testfile-info-link.bz2 [new file with mode: 0755]
tests/testfile-info-link.debuginfo.bz2 [new file with mode: 0755]
tests/testfile-info-link.stripped.bz2 [new file with mode: 0755]