]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Expand testfile52 for 32/64-bit and stripped headers
authorJosh Stone <jistone@redhat.com>
Wed, 12 Jan 2011 03:16:57 +0000 (19:16 -0800)
committerRoland McGrath <roland@redhat.com>
Wed, 12 Jan 2011 18:27:43 +0000 (10:27 -0800)
14 files changed:
tests/ChangeLog
tests/Makefile.am
tests/run-prelink-addr-test.sh
tests/testfile52-32.noshdrs.so.bz2 [new file with mode: 0755]
tests/testfile52-32.prelink.so.bz2 [new file with mode: 0755]
tests/testfile52-32.so.bz2 [new file with mode: 0755]
tests/testfile52-32.so.debug.bz2 [new file with mode: 0755]
tests/testfile52-64.noshdrs.so.bz2 [new file with mode: 0755]
tests/testfile52-64.prelink.so.bz2 [new file with mode: 0755]
tests/testfile52-64.so.bz2 [new file with mode: 0755]
tests/testfile52-64.so.debug.bz2 [new file with mode: 0755]
tests/testfile52.prelink.so.bz2 [deleted file]
tests/testfile52.so.bz2 [deleted file]
tests/testfile52.so.debug.bz2 [deleted file]

index f6aee50b0479b826ece37a906ed3a0c9bda52612..df97240aeeb4987d3d7448b153d282ddca491c03 100644 (file)
@@ -1,3 +1,15 @@
+2011-01-11  Josh Stone  <jistone@redhat.com>
+
+       * run-prelink-addr-test.sh: Run 32 and 64-bit testfile52 tests.
+       * testfile52.so.bz2, testfile52.so.debug.bz2,
+       testfile52.prelink.so.bz2: Deleted, so...
+       * testfile52-32.so.bz2, testfile52-32.so.debug.bz2,
+       testfile52-32.prelink.so.bz2: Recreated with 32-bit names.
+       * testfile52-32.noshdrs.so.bz2: New data file, stripped of headers.
+       * testfile52-64.so.bz2, testfile52-64.so.debug.bz2,
+       testfile52-64.prelink.so.bz2, testfile52-64.noshdrs.so.bz2: New in 64-bit.
+       * Makefile.am (EXTRA_DIST): Add and update all.
+
 2011-01-10  Josh Stone  <jistone@redhat.com>
 
        * run-prelink-addr-test.sh: New test for prelinked addrs.
index 4650a59e7b1f97492e74389ce77906a129c51357..2ab961c35f466aae53f08d8dc8485338dead3bbe 100644 (file)
@@ -140,9 +140,12 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \
             testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \
             testfile49.bz2 testfile50.bz2 testfile51.bz2 \
-            run-prelink-addr-test.sh testfile52.so.bz2 testfile52.so.debug.bz2 \
-            testfile52.prelink.so.bz2 testfile53.bz2 testfile53.debug.bz2 \
-            testfile53.prelink.bz2
+            run-prelink-addr-test.sh \
+            testfile52-32.so.bz2 testfile52-32.so.debug.bz2 \
+            testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
+            testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
+            testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
+            testfile53.bz2 testfile53.debug.bz2 testfile53.prelink.bz2
 
 installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
                              bindir=$(DESTDIR)$(bindir) \
index 9c19988c0931f044a7e73d38cec818d8e3aa55ab..6938ec15ccd8e8c7ecbeca4c9975bcaea03c3e0d 100755 (executable)
 #   #include <stdlib.h>
 #   int foo() { exit(0); }
 #
-# gcc -m32 -g -shared testfile52.c -o testfile52.so
-# eu-strip -f testfile52.so.debug testfile52.so
-# cp testfile52.so testfile52.prelink.so
-# prelink -N testfile52.prelink.so
+# gcc -m32 -g -shared testfile52-32.c -o testfile52-32.so
+# eu-strip -f testfile52-32.so.debug testfile52-32.so
+# cp testfile52-32.so testfile52-32.prelink.so
+# prelink -N testfile52-32.prelink.so
+# cp testfile52-32.so testfile52-32.noshdrs.so
+# prelink -r 0x42000000 testfile52-32.noshdrs.so
+# eu-strip --remove-comment --strip-sections testfile52-32.noshdrs.so
 
-testfiles testfile52.so testfile52.prelink.so testfile52.so.debug
-tempfiles testmaps52
+testfiles testfile52-32.so testfile52-32.so.debug
+testfiles testfile52-32.prelink.so testfile52-32.noshdrs.so
+tempfiles testmaps52-32
 
-cat > testmaps52 <<EOF
-00110000-00111000 r-xp 00000000 00:00 0 [vdso]
-00111000-00112000 r-xp 00000000 fd:01 1 `pwd`/testfile52.so
-00112000-00113000 rw-p 00000000 fd:01 1 `pwd`/testfile52.so
-41000000-41001000 r-xp 00000000 fd:01 2 `pwd`/testfile52.prelink.so
-41001000-41002000 rw-p 00000000 fd:01 2 `pwd`/testfile52.prelink.so
-4718e000-47191000 rw-p 00000000 00:00 0
-f7fda000-f7fdb000 rw-p 00000000 00:00 0
-f7ffd000-f7ffe000 rw-p 00000000 00:00 0
-fffdd000-ffffe000 rw-p 00000000 00:00 0 [stack]
+cat > testmaps52-32 <<EOF
+00111000-00112000 r-xp 00000000 fd:01 1 `pwd`/testfile52-32.so
+00112000-00113000 rw-p 00000000 fd:01 1 `pwd`/testfile52-32.so
+41000000-41001000 r-xp 00000000 fd:01 2 `pwd`/testfile52-32.prelink.so
+41001000-41002000 rw-p 00000000 fd:01 2 `pwd`/testfile52-32.prelink.so
+42000000-42001000 r-xp 00000000 fd:01 3 `pwd`/testfile52-32.noshdrs.so
+42001000-42002000 rw-p 00000000 fd:01 3 `pwd`/testfile52-32.noshdrs.so
 EOF
 
 # Prior to commit 1743d7f, libdwfl would fail on the second address,
 # because it didn't notice that prelink added a 0x20-byte offset from
 # what the .debug file reports.
-testrun_compare ../src/addr2line -S -M testmaps52 0x11140c 0x4100042d <<\EOF
+testrun_compare ../src/addr2line -S -M testmaps52-32 \
+    0x11140c 0x4100042d 0x4200040e <<\EOF
 foo
-/home/jistone/src/elfutils/tests/testfile52.c:2
+/home/jistone/src/elfutils/tests/testfile52-32.c:2
 foo+0x1
-/home/jistone/src/elfutils/tests/testfile52.c:2
+/home/jistone/src/elfutils/tests/testfile52-32.c:2
+foo+0x2
+??:0
+EOF
+
+# Repeat testfile52 for -m64.  The particular REL>RELA issue doesn't exist, but
+# we'll make sure the rest works anyway.
+testfiles testfile52-64.so testfile52-64.so.debug
+testfiles testfile52-64.prelink.so testfile52-64.noshdrs.so
+tempfiles testmaps52-64
+
+cat > testmaps52-64 <<EOF
+1000000000-1000001000 r-xp 00000000 fd:11 1 `pwd`/testfile52-64.so
+1000001000-1000200000 ---p 00001000 fd:11 1 `pwd`/testfile52-64.so
+1000200000-1000201000 rw-p 00000000 fd:11 1 `pwd`/testfile52-64.so
+3000000000-3000001000 r-xp 00000000 fd:11 2 `pwd`/testfile52-64.prelink.so
+3000001000-3000200000 ---p 00001000 fd:11 2 `pwd`/testfile52-64.prelink.so
+3000200000-3000201000 rw-p 00000000 fd:11 2 `pwd`/testfile52-64.prelink.so
+3800000000-3800001000 r-xp 00000000 fd:11 3 `pwd`/testfile52-64.noshdrs.so
+3800001000-3800200000 ---p 00001000 fd:11 3 `pwd`/testfile52-64.noshdrs.so
+3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile52-64.noshdrs.so
+EOF
+
+testrun_compare ../src/addr2line -S -M testmaps52-64 \
+    0x100000056c 0x300000056d 0x380000056e <<\EOF
+foo
+/home/jistone/src/elfutils/tests/testfile52-64.c:2
+foo+0x1
+/home/jistone/src/elfutils/tests/testfile52-64.c:2
+foo+0x2
+??:0
 EOF
 
 
diff --git a/tests/testfile52-32.noshdrs.so.bz2 b/tests/testfile52-32.noshdrs.so.bz2
new file mode 100755 (executable)
index 0000000..01d2742
Binary files /dev/null and b/tests/testfile52-32.noshdrs.so.bz2 differ
diff --git a/tests/testfile52-32.prelink.so.bz2 b/tests/testfile52-32.prelink.so.bz2
new file mode 100755 (executable)
index 0000000..ccb9ae3
Binary files /dev/null and b/tests/testfile52-32.prelink.so.bz2 differ
diff --git a/tests/testfile52-32.so.bz2 b/tests/testfile52-32.so.bz2
new file mode 100755 (executable)
index 0000000..2a5b56e
Binary files /dev/null and b/tests/testfile52-32.so.bz2 differ
diff --git a/tests/testfile52-32.so.debug.bz2 b/tests/testfile52-32.so.debug.bz2
new file mode 100755 (executable)
index 0000000..818b36d
Binary files /dev/null and b/tests/testfile52-32.so.debug.bz2 differ
diff --git a/tests/testfile52-64.noshdrs.so.bz2 b/tests/testfile52-64.noshdrs.so.bz2
new file mode 100755 (executable)
index 0000000..5ca310f
Binary files /dev/null and b/tests/testfile52-64.noshdrs.so.bz2 differ
diff --git a/tests/testfile52-64.prelink.so.bz2 b/tests/testfile52-64.prelink.so.bz2
new file mode 100755 (executable)
index 0000000..8cb8f48
Binary files /dev/null and b/tests/testfile52-64.prelink.so.bz2 differ
diff --git a/tests/testfile52-64.so.bz2 b/tests/testfile52-64.so.bz2
new file mode 100755 (executable)
index 0000000..8009f07
Binary files /dev/null and b/tests/testfile52-64.so.bz2 differ
diff --git a/tests/testfile52-64.so.debug.bz2 b/tests/testfile52-64.so.debug.bz2
new file mode 100755 (executable)
index 0000000..4397788
Binary files /dev/null and b/tests/testfile52-64.so.debug.bz2 differ
diff --git a/tests/testfile52.prelink.so.bz2 b/tests/testfile52.prelink.so.bz2
deleted file mode 100755 (executable)
index b0e3d3f..0000000
Binary files a/tests/testfile52.prelink.so.bz2 and /dev/null differ
diff --git a/tests/testfile52.so.bz2 b/tests/testfile52.so.bz2
deleted file mode 100755 (executable)
index 453759c..0000000
Binary files a/tests/testfile52.so.bz2 and /dev/null differ
diff --git a/tests/testfile52.so.debug.bz2 b/tests/testfile52.so.debug.bz2
deleted file mode 100755 (executable)
index 38088a6..0000000
Binary files a/tests/testfile52.so.debug.bz2 and /dev/null differ