diff options
author | Mark Wielaard <mjw@redhat.com> | 2015-08-11 21:38:38 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-10-05 21:55:51 +0200 |
commit | df7dfab451246e8b088040e052ca01f9d6aba774 (patch) | |
tree | 7c6bf28c6ac102a94a7ebcd9c2ee87e5b29141c9 /src/ChangeLog | |
parent | 3adda3ce2a83e2733aa0c84da9bb7949413d02fd (diff) | |
download | android_external_elfutils-df7dfab451246e8b088040e052ca01f9d6aba774.tar.gz android_external_elfutils-df7dfab451246e8b088040e052ca01f9d6aba774.tar.bz2 android_external_elfutils-df7dfab451246e8b088040e052ca01f9d6aba774.zip |
Handle merged strtab/shstrtab string tables in strip and unstrip.
ELF files can share the section header string table (e_shstrndx) with
the symtab .strtab section. That might in some cases save a bit of space
since symbols and sections might share some (sub)strings. To handle that
eu-strip just needs to not unconditionally remove the .shstrtab section
(it will be properly marked as used/unused as needed). eu-unstrip needs
to make sure the section names are added to the strtab if it decides to
rewrite that section. Also makes sure that eu-strip won't move around
a SHT_NOBITS section that has SHF_ALLOC set. Although it is allowed to
move such sections around, there is no benefit. And some tools might
expect no allocated section to move around, not even a nobits section.
It also makes it harder to do "roundtripping" sanity checks that make
sure splitting a file with eu-strip and then reconstructed with eu-unstrip
produce the same ELF file (as is done in the new run-strip-strmerge.sh).
Introduces a somewhat large test generator elfstrmerge.c that will
hopefully turn into a more generic string table merger program.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'src/ChangeLog')
-rw-r--r-- | src/ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 49aa3f7e..72bb0ab8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2015-10-02 Mark Wielaard <mjw@redhat.com> + + * strip.c (handle_elf): Don't move around allocated NOBITS sections. + Don't just mark the section header string table as unused. + * unstrip.c (copy_elided_sections): Add header names to strtab if + shstrndx equals the symtab strtabndx. + 2015-09-22 Mark Wielaard <mjw@redhat.com> * strip.c (cleanup_debug): Remove old-style function definitions. |