]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
strip: Use ELF_CHF_FORCE to recompress any sections that were uncompressed.
authorMark Wielaard <mjw@redhat.com>
Thu, 25 Aug 2016 18:43:42 +0000 (20:43 +0200)
committerMark Wielaard <mjw@redhat.com>
Thu, 25 Aug 2016 18:52:01 +0000 (20:52 +0200)
Older gcc might create small .debug_pubtype. If such a section is compressed
then strip should use ELF_CHF_FORCE to return it to compressed state after it
is done with the section. Found by the run-strip-reloc.sh testcase on rhel6.

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

index 835888da18f8cc3d39ea91c47db16281d8dcf997..e5b3b202bcb1d0c2659a467195bea414197013da 100644 (file)
@@ -1,3 +1,7 @@
+2016-08-25  Mark Wielaard  <mjw@redhat.com>
+
+       * strip.c (handle_elf): Recompress with ELF_CHF_FORCE.
+
 2016-08-06  Mark Wielaard  <mjw@redhat.com>
 
        * strip.c (handle_elf): Uncompress and recompress relocation target
index f56554f7dea48c8854f095589ae1827ffa37152f..da093e971f90b4f3a3562f5d634f3338a489ee82 100644 (file)
@@ -1986,7 +1986,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
              gelf_update_shdr (scn, shdr);
 
              if (tcompress_type != 0)
-               if (elf_compress (tscn, tcompress_type, 0) != 1)
+               if (elf_compress (tscn, tcompress_type, ELF_CHF_FORCE) != 1)
                  INTERNAL_ERROR (fname);
            }
        }