[PATCH] unstrip: Handle SHT_GROUP sections in ET_REL files.

2018-07-21 Thread Mark Wielaard
SHT_GROUP sections are put in both the stripped and debug file. Handle correcting the symbol table/name entry of the group only once. The testfile was generated with the gcc annobin plugin. Signed-off-by: Mark Wielaard --- src/ChangeLog | 4 +++ src/unstrip.c

[PATCH] backends: add abi_cfi and set_initial_registers_tid callbacks for M68K

2018-07-21 Thread Andreas Schwab
This fixes all testsuite failures. Signed-off-by: Andreas Schwab --- backends/ChangeLog | 8 +++ backends/Makefile.am | 2 +- backends/{m68k_init.c => m68k_cfi.c} | 48 backends/m68k_init.c | 4 ++ backends/m68k_initreg.c

[PATCH] elfcompress: Don't rewrite file if no section data needs to be updated.

2018-07-21 Thread Mark Wielaard
If the input and output file are the same and no section needs to be updated we really don't need to rewrite the file. Check whether any matching section is already compressed or (GNU) decompressed. Skip the section if it doesn't need to be changed. If no section data needs updating end with succes

[PATCH] elfcompress: Swap fchmod and fchown calls on new file.

2018-07-21 Thread Mark Wielaard
Calling fchmod with a suid bit on a file might silently fail or the suid bit might be slilently cleared by a call to fchown if already set. Swap the calls so that the owner is set first and then set the suid bit. https://bugzilla.redhat.com/show_bug.cgi?id=1607044 Signed-off-by: Mark Wielaard --