]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
run-prelink-addr-test.sh: Add a .dynbss+.bss prelink split
authorJosh Stone <jistone@redhat.com>
Thu, 3 Feb 2011 00:30:01 +0000 (16:30 -0800)
committerRoland McGrath <roland@redhat.com>
Thu, 3 Feb 2011 01:22:14 +0000 (17:22 -0800)
tests/ChangeLog
tests/Makefile.am
tests/run-prelink-addr-test.sh
tests/testfile55-32.bz2 [new file with mode: 0755]
tests/testfile55-32.debug.bz2 [new file with mode: 0755]
tests/testfile55-32.prelink.bz2 [new file with mode: 0755]
tests/testfile55-64.bz2 [new file with mode: 0755]
tests/testfile55-64.debug.bz2 [new file with mode: 0755]
tests/testfile55-64.prelink.bz2 [new file with mode: 0755]

index 9ba08acb70e66767ed7da755c033ee8f39cb7fe5..bc7884316b309f4ff051a8ebb7d38953354360d4 100644 (file)
@@ -1,3 +1,11 @@
+2011-02-02  Josh Stone  <jistone@redhat.com>
+
+       * run-prelink-addr-test.sh: Add testfile55, 32 and 64-bit.
+       * testfile55-64.bz2, testfile55-64.debug.bz2,
+       testfile55-64.prelink.bz2, testfile55-32.bz2,
+       testfile55-32.debug.bz2, testfile55-32.prelink.bz2: New.
+       * Makefile.am (EXTRA_DIST): Add and update all.
+
 2011-01-12  Roland McGrath  <roland@redhat.com>
 
        * run-prelink-addr-test.sh: Make symlinks to find .debug files
index 04805f057d2693aed224f6116bbaa9d8fa813d25..b317553d7a52df38b27fcef9d0e6916d13b09328 100644 (file)
@@ -151,7 +151,10 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             testfile54-32.so.bz2 testfile54-32.so.debug.bz2 \
             testfile54-32.prelink.so.bz2 testfile54-32.noshdrs.so.bz2 \
             testfile54-64.so.bz2 testfile54-64.so.debug.bz2 \
-            testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2
+            testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2 \
+            testfile55-32.bz2 testfile55-32.debug.bz2 \
+            testfile55-32.prelink.bz2 testfile55-64.bz2 \
+            testfile55-64.debug.bz2 testfile55-64.prelink.bz2
 
 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
                              bindir=$(DESTDIR)$(bindir) \
index b7e32889cb062ed9c030239770b75643cb124e9f..38a2130d6bc2fdcd984bfec9fd107a68ff18086c 100755 (executable)
@@ -214,3 +214,47 @@ pstdin+0x1
 foo+0x2
 ??:0
 EOF
+
+
+# testfile55.c:
+#   extern void *stdin;
+#   int main() { return !stdin; }
+#
+# gcc -m32 -g testfile55-32.c -o testfile55-32
+# eu-strip -f testfile55-32.debug testfile55-32
+# cp testfile55-32 testfile55-32.prelink
+# prelink -N testfile55-32.prelink
+testfiles testfile55-32 testfile55-32.debug testfile55-32.prelink
+
+testrun_compare ../src/addr2line -S -e testfile55-32 0x80483b4 0x80483b5 <<\EOF
+main
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+main+0x1
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+EOF
+
+# prelink splits .bss into .dynbss+.bss, so the start of .bss changes, but the
+# total size remains the same, and .text doesn't move at all.
+testrun_compare ../src/addr2line -S -e testfile55-32.prelink 0x80483b6 0x80483b7 <<\EOF
+main+0x2
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+main+0x3
+/home/jistone/src/elfutils/tests/testfile55-32.c:2
+EOF
+
+# Repeat testfile55 in 64-bit
+testfiles testfile55-64 testfile55-64.debug testfile55-64.prelink
+
+testrun_compare ../src/addr2line -S -e testfile55-64 0x4004b4 0x4004b5 <<\EOF
+main
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+main+0x1
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+EOF
+
+testrun_compare ../src/addr2line -S -e testfile55-64.prelink 0x4004b6 0x4004b7 <<\EOF
+main+0x2
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+main+0x3
+/home/jistone/src/elfutils/tests/testfile55-64.c:2
+EOF
diff --git a/tests/testfile55-32.bz2 b/tests/testfile55-32.bz2
new file mode 100755 (executable)
index 0000000..d4cc986
Binary files /dev/null and b/tests/testfile55-32.bz2 differ
diff --git a/tests/testfile55-32.debug.bz2 b/tests/testfile55-32.debug.bz2
new file mode 100755 (executable)
index 0000000..c5aa3f6
Binary files /dev/null and b/tests/testfile55-32.debug.bz2 differ
diff --git a/tests/testfile55-32.prelink.bz2 b/tests/testfile55-32.prelink.bz2
new file mode 100755 (executable)
index 0000000..4fc171a
Binary files /dev/null and b/tests/testfile55-32.prelink.bz2 differ
diff --git a/tests/testfile55-64.bz2 b/tests/testfile55-64.bz2
new file mode 100755 (executable)
index 0000000..27341fa
Binary files /dev/null and b/tests/testfile55-64.bz2 differ
diff --git a/tests/testfile55-64.debug.bz2 b/tests/testfile55-64.debug.bz2
new file mode 100755 (executable)
index 0000000..d975c70
Binary files /dev/null and b/tests/testfile55-64.debug.bz2 differ
diff --git a/tests/testfile55-64.prelink.bz2 b/tests/testfile55-64.prelink.bz2
new file mode 100755 (executable)
index 0000000..a4338fe
Binary files /dev/null and b/tests/testfile55-64.prelink.bz2 differ