]> git.ipfire.org Git - thirdparty/elfutils.git/commit
strip: Handle compressed relocation target sections.
authorMark Wielaard <mjw@redhat.com>
Sat, 6 Aug 2016 13:13:19 +0000 (15:13 +0200)
committerMark Wielaard <mjw@redhat.com>
Mon, 15 Aug 2016 07:58:09 +0000 (09:58 +0200)
commit6ff6c215bfa4153874751cdc0bae26acfbba4a81
treed66b9e7fd602ed1733cca45dcfab8edd05425b00
parenta8b2529facfbabfe4c8a0ca1a4387fe482d1c955
strip: Handle compressed relocation target sections.

binutils 2.27 assembler will create compressed sections for x86 ELF
targets. The linker will decompress them again and it doesn't do this
for any other target. This broke one of the run-strip-reloc.sh self tests.

Fix by checking if the target of a relocation section is compressed and
first decompressing it before applying relocations and then compressing
again if necessary.

Add explicit testcases for compressed and uncompressed ET_REL files
to run-strip-reloc.sh.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/strip.c
tests/ChangeLog
tests/run-strip-reloc.sh