summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/ChangeLog7
-rw-r--r--tests/Makefile.am6
-rwxr-xr-xtests/run-prelink-addr-test.sh71
-rwxr-xr-xtests/testfile54-32.noshdrs.so.bz2bin0 -> 416 bytes
-rwxr-xr-xtests/testfile54-32.prelink.so.bz2bin0 -> 1035 bytes
-rwxr-xr-xtests/testfile54-32.so.bz2bin0 -> 745 bytes
-rwxr-xr-xtests/testfile54-32.so.debug.bz2bin0 -> 1009 bytes
-rwxr-xr-xtests/testfile54-64.noshdrs.so.bz2bin0 -> 458 bytes
-rwxr-xr-xtests/testfile54-64.prelink.so.bz2bin0 -> 1127 bytes
-rwxr-xr-xtests/testfile54-64.so.bz2bin0 -> 799 bytes
-rwxr-xr-xtests/testfile54-64.so.debug.bz2bin0 -> 1052 bytes
11 files changed, 83 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index bb5634da..fa2a28e3 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,12 @@
2011-01-11 Josh Stone <jistone@redhat.com>
+ * run-prelink-addr-test.sh: Add testfile54, 32 and 64-bit.
+ * 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: New.
+ * Makefile.am (EXTRA_DIST): Add and update all.
+
* run-prelink-addr-test.sh: Run 32 and 64-bit testfile53 tests.
* testfile53.bz2, testfile53.debug.bz2,
testfile53.prelink.bz2: Deleted, so...
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9f191ce2..04805f05 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -147,7 +147,11 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
testfile53-32.bz2 testfile53-32.debug.bz2 \
testfile53-32.prelink.bz2 testfile53-64.bz2 \
- testfile53-64.debug.bz2 testfile53-64.prelink.bz2
+ testfile53-64.debug.bz2 testfile53-64.prelink.bz2 \
+ 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
installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
bindir=$(DESTDIR)$(bindir) \
diff --git a/tests/run-prelink-addr-test.sh b/tests/run-prelink-addr-test.sh
index e554d4b0..f32b8b70 100755
--- a/tests/run-prelink-addr-test.sh
+++ b/tests/run-prelink-addr-test.sh
@@ -135,3 +135,74 @@ main+0x2
main+0x3
/home/jistone/src/elfutils/tests/testfile53-64.c:2
EOF
+
+
+# testfile54.c:
+# extern void * stdin;
+# static void * pstdin = &stdin;
+# void * const foo = &pstdin;
+#
+# gcc -m32 -g -shared -nostartfiles testfile54-32.c -o testfile54-32.so
+# eu-strip -f testfile54-32.so.debug testfile54-32.so
+# cp testfile54-32.so testfile54-32.prelink.so
+# prelink -N testfile54-32.prelink.so
+# cp testfile54-32.so testfile54-32.noshdrs.so
+# prelink -r 0x42000000 testfile54-32.noshdrs.so
+# eu-strip --remove-comment --strip-sections testfile54-32.noshdrs.so
+testfiles testfile54-32.so testfile54-32.so.debug
+testfiles testfile54-32.prelink.so testfile54-32.noshdrs.so
+tempfiles testmaps54-32
+
+cat > testmaps54-32 <<EOF
+00111000-00112000 r--p 00000000 fd:01 1 `pwd`/testfile54-32.so
+00112000-00113000 rw-p 00000000 fd:01 1 `pwd`/testfile54-32.so
+41000000-41001000 r--p 00000000 fd:01 2 `pwd`/testfile54-32.prelink.so
+41001000-41002000 rw-p 00000000 fd:01 2 `pwd`/testfile54-32.prelink.so
+42000000-42001000 r--p 00000000 fd:01 3 `pwd`/testfile54-32.noshdrs.so
+42001000-42002000 rw-p 00000000 fd:01 3 `pwd`/testfile54-32.noshdrs.so
+EOF
+
+testrun_compare ../src/addr2line -S -M testmaps54-32 \
+ 0x1111fc 0x1122a4 0x410001fd 0x410012a5 0x420001fe <<\EOF
+foo
+??:0
+pstdin
+??:0
+foo+0x1
+??:0
+pstdin+0x1
+??:0
+foo+0x2
+??:0
+EOF
+
+# Repeat testfile64 in 64-bit
+testfiles testfile54-64.so testfile54-64.so.debug
+testfiles testfile54-64.prelink.so testfile54-64.noshdrs.so
+tempfiles testmaps54-64
+
+cat > testmaps54-64 <<EOF
+1000000000-1000001000 r--p 00000000 fd:11 1 `pwd`/testfile54-64.so
+1000001000-1000200000 ---p 00001000 fd:11 1 `pwd`/testfile54-64.so
+1000200000-1000201000 rw-p 00000000 fd:11 1 `pwd`/testfile54-64.so
+3000000000-3000001000 r--p 00000000 fd:11 2 `pwd`/testfile54-64.prelink.so
+3000001000-3000200000 ---p 00001000 fd:11 2 `pwd`/testfile54-64.prelink.so
+3000200000-3000201000 rw-p 00000000 fd:11 2 `pwd`/testfile54-64.prelink.so
+3800000000-3800001000 r--p 00000000 fd:11 3 `pwd`/testfile54-64.noshdrs.so
+3800001000-3800200000 ---p 00001000 fd:11 3 `pwd`/testfile54-64.noshdrs.so
+3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile54-64.noshdrs.so
+EOF
+
+testrun_compare ../src/addr2line -S -M testmaps54-64 \
+ 0x10000002f8 0x1000200448 0x30000002f9 0x3000200449 0x38000002fa <<\EOF
+foo
+??:0
+pstdin
+??:0
+foo+0x1
+??:0
+pstdin+0x1
+??:0
+foo+0x2
+??:0
+EOF
diff --git a/tests/testfile54-32.noshdrs.so.bz2 b/tests/testfile54-32.noshdrs.so.bz2
new file mode 100755
index 00000000..846bc91e
--- /dev/null
+++ b/tests/testfile54-32.noshdrs.so.bz2
Binary files differ
diff --git a/tests/testfile54-32.prelink.so.bz2 b/tests/testfile54-32.prelink.so.bz2
new file mode 100755
index 00000000..85c8526c
--- /dev/null
+++ b/tests/testfile54-32.prelink.so.bz2
Binary files differ
diff --git a/tests/testfile54-32.so.bz2 b/tests/testfile54-32.so.bz2
new file mode 100755
index 00000000..4bc4fa37
--- /dev/null
+++ b/tests/testfile54-32.so.bz2
Binary files differ
diff --git a/tests/testfile54-32.so.debug.bz2 b/tests/testfile54-32.so.debug.bz2
new file mode 100755
index 00000000..79dd614d
--- /dev/null
+++ b/tests/testfile54-32.so.debug.bz2
Binary files differ
diff --git a/tests/testfile54-64.noshdrs.so.bz2 b/tests/testfile54-64.noshdrs.so.bz2
new file mode 100755
index 00000000..3da726a6
--- /dev/null
+++ b/tests/testfile54-64.noshdrs.so.bz2
Binary files differ
diff --git a/tests/testfile54-64.prelink.so.bz2 b/tests/testfile54-64.prelink.so.bz2
new file mode 100755
index 00000000..e296a1d9
--- /dev/null
+++ b/tests/testfile54-64.prelink.so.bz2
Binary files differ
diff --git a/tests/testfile54-64.so.bz2 b/tests/testfile54-64.so.bz2
new file mode 100755
index 00000000..6072bf19
--- /dev/null
+++ b/tests/testfile54-64.so.bz2
Binary files differ
diff --git a/tests/testfile54-64.so.debug.bz2 b/tests/testfile54-64.so.debug.bz2
new file mode 100755
index 00000000..6b45390e
--- /dev/null
+++ b/tests/testfile54-64.so.debug.bz2
Binary files differ