diff options
author | Josh Stone <jistone@redhat.com> | 2011-01-11 19:16:57 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2011-01-12 10:27:43 -0800 |
commit | d41d9a6917721152ad2a9963cf8f487787041e9e (patch) | |
tree | de95dfa29482ea614d2cdc4fd0dc7fd353f425e7 | |
parent | f631595824e796f93fac031d515a2b33eb75af1f (diff) | |
download | elfutils-d41d9a6917721152ad2a9963cf8f487787041e9e.tar.gz |
Expand testfile52 for 32/64-bit and stripped headers
-rw-r--r-- | tests/ChangeLog | 12 | ||||
-rw-r--r-- | tests/Makefile.am | 9 | ||||
-rwxr-xr-x | tests/run-prelink-addr-test.sh | 70 | ||||
-rwxr-xr-x | tests/testfile52-32.noshdrs.so.bz2 | bin | 0 -> 944 bytes | |||
-rwxr-xr-x | tests/testfile52-32.prelink.so.bz2 | bin | 0 -> 1839 bytes | |||
-rwxr-xr-x | tests/testfile52-32.so.bz2 | bin | 0 -> 1445 bytes | |||
-rwxr-xr-x | tests/testfile52-32.so.debug.bz2 | bin | 0 -> 1681 bytes | |||
-rwxr-xr-x | tests/testfile52-64.noshdrs.so.bz2 | bin | 0 -> 1044 bytes | |||
-rwxr-xr-x | tests/testfile52-64.prelink.so.bz2 | bin | 0 -> 1978 bytes | |||
-rwxr-xr-x | tests/testfile52-64.so.bz2 | bin | 0 -> 1558 bytes | |||
-rwxr-xr-x | tests/testfile52-64.so.debug.bz2 | bin | 0 -> 1693 bytes | |||
-rwxr-xr-x | tests/testfile52.prelink.so.bz2 | bin | 1826 -> 0 bytes | |||
-rwxr-xr-x | tests/testfile52.so.bz2 | bin | 1444 -> 0 bytes | |||
-rwxr-xr-x | tests/testfile52.so.debug.bz2 | bin | 1672 -> 0 bytes |
14 files changed, 69 insertions, 22 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index f6aee50b..df97240a 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -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. diff --git a/tests/Makefile.am b/tests/Makefile.am index 4650a59e..2ab961c3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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) \ diff --git a/tests/run-prelink-addr-test.sh b/tests/run-prelink-addr-test.sh index 9c19988c..6938ec15 100755 --- a/tests/run-prelink-addr-test.sh +++ b/tests/run-prelink-addr-test.sh @@ -30,34 +30,66 @@ # #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 Binary files differnew file mode 100755 index 00000000..01d27424 --- /dev/null +++ b/tests/testfile52-32.noshdrs.so.bz2 diff --git a/tests/testfile52-32.prelink.so.bz2 b/tests/testfile52-32.prelink.so.bz2 Binary files differnew file mode 100755 index 00000000..ccb9ae32 --- /dev/null +++ b/tests/testfile52-32.prelink.so.bz2 diff --git a/tests/testfile52-32.so.bz2 b/tests/testfile52-32.so.bz2 Binary files differnew file mode 100755 index 00000000..2a5b56ea --- /dev/null +++ b/tests/testfile52-32.so.bz2 diff --git a/tests/testfile52-32.so.debug.bz2 b/tests/testfile52-32.so.debug.bz2 Binary files differnew file mode 100755 index 00000000..818b36d5 --- /dev/null +++ b/tests/testfile52-32.so.debug.bz2 diff --git a/tests/testfile52-64.noshdrs.so.bz2 b/tests/testfile52-64.noshdrs.so.bz2 Binary files differnew file mode 100755 index 00000000..5ca310f0 --- /dev/null +++ b/tests/testfile52-64.noshdrs.so.bz2 diff --git a/tests/testfile52-64.prelink.so.bz2 b/tests/testfile52-64.prelink.so.bz2 Binary files differnew file mode 100755 index 00000000..8cb8f482 --- /dev/null +++ b/tests/testfile52-64.prelink.so.bz2 diff --git a/tests/testfile52-64.so.bz2 b/tests/testfile52-64.so.bz2 Binary files differnew file mode 100755 index 00000000..8009f07c --- /dev/null +++ b/tests/testfile52-64.so.bz2 diff --git a/tests/testfile52-64.so.debug.bz2 b/tests/testfile52-64.so.debug.bz2 Binary files differnew file mode 100755 index 00000000..4397788f --- /dev/null +++ b/tests/testfile52-64.so.debug.bz2 diff --git a/tests/testfile52.prelink.so.bz2 b/tests/testfile52.prelink.so.bz2 Binary files differdeleted file mode 100755 index b0e3d3fc..00000000 --- a/tests/testfile52.prelink.so.bz2 +++ /dev/null diff --git a/tests/testfile52.so.bz2 b/tests/testfile52.so.bz2 Binary files differdeleted file mode 100755 index 453759cd..00000000 --- a/tests/testfile52.so.bz2 +++ /dev/null diff --git a/tests/testfile52.so.debug.bz2 b/tests/testfile52.so.debug.bz2 Binary files differdeleted file mode 100755 index 38088a67..00000000 --- a/tests/testfile52.so.debug.bz2 +++ /dev/null |