]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
tests: unstrip: Add test for mismatched .strtab sections
authorKevin Cernekee <cernekee@chromium.org>
Sun, 23 Oct 2016 17:25:56 +0000 (10:25 -0700)
committerMark Wielaard <mjw@redhat.com>
Mon, 24 Oct 2016 10:48:43 +0000 (12:48 +0200)
Current unstrip test cases either have no .symtab/.strtab in the
stripped binary, or .strtab sections that are identical between the
stripped and debuginfo binaries.  Add a test case where .symtab/.strtab
in the stripped binary contains a small subset of the full unstripped
data.

Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
tests/ChangeLog
tests/Makefile.am
tests/run-unstrip-test4.sh [new file with mode: 0755]
tests/testfile-strtab.bz2 [new file with mode: 0644]
tests/testfile-strtab.debuginfo.bz2 [new file with mode: 0644]
tests/testfile-strtab.stripped.bz2 [new file with mode: 0644]

index 31904e768d9e2f16afc9b4c24079708d77e80a69..3d34778bda3981e6cf323c4df7bfc14192b28318 100644 (file)
@@ -1,4 +1,14 @@
-2015-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
+2016-10-22  Kevin Cernekee  <cernekee@chromium.org>
+
+       * Makefile.am (TESTS): Add run-unstrip-test4.sh.
+       (EXTRA_DIST): Add run-unstrip-test4.sh, testfile-strtab.bz2,
+       testfile-strtab.stripped.bz2, testfile-strtab.debuginfo.bz2.
+       (run-unstrip-test4.sh): New file.
+       (testfile-strtab.bz2): New file.
+       (testfile-strtab.stripped.bz2): New file.
+       (testfile-strtab.debuginfo.bz2): New file.
+
+2016-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
 
        * arextract.c: Remove sys/param.h include, add system.h include.
 
index e331cb5564b063180dffe1265a6ac82c29fa8b56..d4659cdb1fbbbbb53694a4e4eaeee424c02728db 100644 (file)
@@ -81,8 +81,8 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
        run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
        run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
        run-strip-nobitsalign.sh \
-       run-unstrip-test.sh run-unstrip-test2.sh \
-       run-unstrip-test3.sh run-unstrip-M.sh run-elfstrmerge-test.sh \
+       run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-test3.sh \
+       run-unstrip-test4.sh run-unstrip-M.sh run-elfstrmerge-test.sh \
        run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
        run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
        run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
@@ -176,6 +176,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             run-unstrip-test.sh run-unstrip-test2.sh \
             testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \
             testfile-info-link.stripped.bz2 run-unstrip-test3.sh \
+            run-unstrip-test4.sh testfile-strtab.bz2 \
+            testfile-strtab.stripped.bz2 testfile-strtab.debuginfo.bz2 \
             run-unstrip-M.sh run-elfstrmerge-test.sh \
             run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
             run-ranlib-test3.sh run-ranlib-test4.sh \
diff --git a/tests/run-unstrip-test4.sh b/tests/run-unstrip-test4.sh
new file mode 100755 (executable)
index 0000000..6ca5d0e
--- /dev/null
@@ -0,0 +1,18 @@
+# Test whether unstrip can combine a stripped kernel object that has
+# limited .symtab/.strtab data, with a separate .debuginfo binary that
+# has full .symtab/.strtab data.
+#
+# This was generated as part of a Chromium OS kernel build:
+#
+#   emerge-kevin chromeos-kernel-4_4
+#
+# Setup instructions:
+#
+#   https://www.chromium.org/chromium-os/developer-guide
+#   https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/kernel-faq
+
+original=testfile-strtab
+stripped=testfile-strtab.stripped
+debugfile=testfile-strtab.debuginfo
+
+. $srcdir/run-unstrip-test.sh
diff --git a/tests/testfile-strtab.bz2 b/tests/testfile-strtab.bz2
new file mode 100644 (file)
index 0000000..4eda14d
Binary files /dev/null and b/tests/testfile-strtab.bz2 differ
diff --git a/tests/testfile-strtab.debuginfo.bz2 b/tests/testfile-strtab.debuginfo.bz2
new file mode 100644 (file)
index 0000000..6fb8164
Binary files /dev/null and b/tests/testfile-strtab.debuginfo.bz2 differ
diff --git a/tests/testfile-strtab.stripped.bz2 b/tests/testfile-strtab.stripped.bz2
new file mode 100644 (file)
index 0000000..779bfdb
Binary files /dev/null and b/tests/testfile-strtab.stripped.bz2 differ