summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2011-02-15 09:34:08 -0800
committerRoland McGrath <[email protected]>2011-02-15 09:34:08 -0800
commitdb9d94008cbb190a35d4107554f7766fbaa3e40e (patch)
tree66e655bcb90227c34dba1b83df9cc8cf7b1ddaba /tests
parenta74a3171e247e6433df37a95f0d0d6404aa07594 (diff)
parent170ecbd2b0578aa9b9408432dbca1fada0f9d80e (diff)
Merge commit 'elfutils-0.152' into dwarf
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog8
-rw-r--r--tests/Makefile.am5
-rwxr-xr-xtests/run-prelink-addr-test.sh44
-rwxr-xr-xtests/testfile55-32.bz2bin0 -> 1661 bytes
-rwxr-xr-xtests/testfile55-32.debug.bz2bin0 -> 1894 bytes
-rwxr-xr-xtests/testfile55-32.prelink.bz2bin0 -> 2163 bytes
-rwxr-xr-xtests/testfile55-64.bz2bin0 -> 1725 bytes
-rwxr-xr-xtests/testfile55-64.debug.bz2bin0 -> 1869 bytes
-rwxr-xr-xtests/testfile55-64.prelink.bz2bin0 -> 2259 bytes
9 files changed, 56 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 28a88d22..a00733f7 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,11 @@
+2011-02-02 Josh Stone <[email protected]>
+
+ * 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 <[email protected]>
* run-prelink-addr-test.sh: Make symlinks to find .debug files
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 34e48e96..616f900f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -159,7 +159,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) \
diff --git a/tests/run-prelink-addr-test.sh b/tests/run-prelink-addr-test.sh
index b7e32889..38a2130d 100755
--- a/tests/run-prelink-addr-test.sh
+++ b/tests/run-prelink-addr-test.sh
@@ -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
index 00000000..d4cc9860
--- /dev/null
+++ b/tests/testfile55-32.bz2
Binary files differ
diff --git a/tests/testfile55-32.debug.bz2 b/tests/testfile55-32.debug.bz2
new file mode 100755
index 00000000..c5aa3f63
--- /dev/null
+++ b/tests/testfile55-32.debug.bz2
Binary files differ
diff --git a/tests/testfile55-32.prelink.bz2 b/tests/testfile55-32.prelink.bz2
new file mode 100755
index 00000000..4fc171af
--- /dev/null
+++ b/tests/testfile55-32.prelink.bz2
Binary files differ
diff --git a/tests/testfile55-64.bz2 b/tests/testfile55-64.bz2
new file mode 100755
index 00000000..27341fa0
--- /dev/null
+++ b/tests/testfile55-64.bz2
Binary files differ
diff --git a/tests/testfile55-64.debug.bz2 b/tests/testfile55-64.debug.bz2
new file mode 100755
index 00000000..d975c70a
--- /dev/null
+++ b/tests/testfile55-64.debug.bz2
Binary files differ
diff --git a/tests/testfile55-64.prelink.bz2 b/tests/testfile55-64.prelink.bz2
new file mode 100755
index 00000000..a4338fe0
--- /dev/null
+++ b/tests/testfile55-64.prelink.bz2
Binary files differ