summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2015-08-11 21:38:38 +0200
committerMark Wielaard <mjw@redhat.com>2015-10-05 21:55:51 +0200
commitdf7dfab451246e8b088040e052ca01f9d6aba774 (patch)
tree7c6bf28c6ac102a94a7ebcd9c2ee87e5b29141c9 /tests/Makefile.am
parent3adda3ce2a83e2733aa0c84da9bb7949413d02fd (diff)
downloadandroid_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 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index eaa904cd..4ff48e64 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -52,7 +52,7 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
backtrace-data backtrace-dwarf debuglink debugaltlink \
buildid deleted deleted-lib.so aggregate_size vdsosyms \
getsrc_die strptr newdata elfstrtab dwfl-proc-attach \
- elfshphehdr
+ elfshphehdr elfstrmerge
asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
asm-tst6 asm-tst7 asm-tst8 asm-tst9
@@ -78,7 +78,7 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
run-strip-test9.sh run-strip-test10.sh \
- run-strip-groups.sh run-strip-reloc.sh \
+ run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
run-unstrip-test.sh run-unstrip-test2.sh \
run-unstrip-test3.sh run-unstrip-M.sh \
run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
@@ -161,7 +161,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
- run-strip-test9.sh run-strip-test10.sh \
+ run-strip-test9.sh run-strip-test10.sh run-strip-strmerge.sh \
run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
run-unstrip-test.sh run-unstrip-test2.sh \
@@ -451,6 +451,7 @@ elfstrtab_LDADD = $(libelf)
dwfl_proc_attach_LDADD = $(libdw)
dwfl_proc_attach_LDFLAGS = -pthread
elfshphehdr_LDADD =$(libelf)
+elfstrmerge_LDADD = $(libebl) $(libelf)
if GCOV
check: check-am coverage