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>
4 files changed