From: Josh Stone Date: Wed, 12 Jan 2011 03:16:58 +0000 (-0800) Subject: Expand testfile53 for 32/64-bit X-Git-Tag: elfutils-0.151~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf51471777953c1c6cfcbe7ad5df09c23c1964be;p=thirdparty%2Felfutils.git Expand testfile53 for 32/64-bit --- diff --git a/tests/ChangeLog b/tests/ChangeLog index df97240ae..bb5634da2 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,14 @@ 2011-01-11 Josh Stone + * run-prelink-addr-test.sh: Run 32 and 64-bit testfile53 tests. + * testfile53.bz2, testfile53.debug.bz2, + testfile53.prelink.bz2: Deleted, so... + * testfile53-64.bz2, testfile53-64.debug.bz2, + testfile53-64.prelink.bz2: Recreated with 64-bit names. + * testfile53-32.bz2, testfile53-32.debug.bz2, + testfile53-32.prelink.bz2: New in 32-bit. + * Makefile.am (EXTRA_DIST): Add and update all. + * 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... diff --git a/tests/Makefile.am b/tests/Makefile.am index 2ab961c35..9f191ce21 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -145,7 +145,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ 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 + testfile53-32.bz2 testfile53-32.debug.bz2 \ + testfile53-32.prelink.bz2 testfile53-64.bz2 \ + testfile53-64.debug.bz2 testfile53-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 6938ec15c..e554d4b0b 100755 --- a/tests/run-prelink-addr-test.sh +++ b/tests/run-prelink-addr-test.sh @@ -94,26 +94,44 @@ EOF # testfile53.c: -# char foo[2000]; +# char foo[0x1000]; # int main() { return 0; } # -# gcc -g testfile53.c -o testfile53 -# eu-strip -f testfile53.debug testfile53 -# cp testfile53 testfile53.prelinked -# prelink -N testfile53.prelinked -testfiles testfile53 testfile53.prelink testfile53.debug +# gcc -m32 -g testfile53-32.c -o testfile53-32 +# eu-strip -f testfile53-32.debug testfile53-32 +# cp testfile53-32 testfile53-32.prelink +# prelink -N testfile53-32.prelink +testfiles testfile53-32 testfile53-32.debug testfile53-32.prelink -testrun_compare ../src/addr2line -S -e testfile53 0x400474 0x400475 <<\EOF +testrun_compare ../src/addr2line -S -e testfile53-32 0x8048394 0x8048395 <<\EOF main -/home/jistone/src/elfutils/tests/testfile53.c:2 +/home/jistone/src/elfutils/tests/testfile53-32.c:2 main+0x1 -/home/jistone/src/elfutils/tests/testfile53.c:2 +/home/jistone/src/elfutils/tests/testfile53-32.c:2 EOF # prelink shuffled some of the sections, but .text is in the same place. -testrun_compare ../src/addr2line -S -e testfile53.prelink 0x400476 0x400477 <<\EOF +testrun_compare ../src/addr2line -S -e testfile53-32.prelink 0x8048396 0x8048397 <<\EOF main+0x2 -/home/jistone/src/elfutils/tests/testfile53.c:2 +/home/jistone/src/elfutils/tests/testfile53-32.c:2 main+0x3 -/home/jistone/src/elfutils/tests/testfile53.c:2 +/home/jistone/src/elfutils/tests/testfile53-32.c:2 +EOF + +# Repeat testfile53 in 64-bit, except use foo[0x800] to achieve the same +# prelink section shuffling. +testfiles testfile53-64 testfile53-64.debug testfile53-64.prelink + +testrun_compare ../src/addr2line -S -e testfile53-64 0x400474 0x400475 <<\EOF +main +/home/jistone/src/elfutils/tests/testfile53-64.c:2 +main+0x1 +/home/jistone/src/elfutils/tests/testfile53-64.c:2 +EOF + +testrun_compare ../src/addr2line -S -e testfile53-64.prelink 0x400476 0x400477 <<\EOF +main+0x2 +/home/jistone/src/elfutils/tests/testfile53-64.c:2 +main+0x3 +/home/jistone/src/elfutils/tests/testfile53-64.c:2 EOF diff --git a/tests/testfile53-32.bz2 b/tests/testfile53-32.bz2 new file mode 100755 index 000000000..7bf48d9ff Binary files /dev/null and b/tests/testfile53-32.bz2 differ diff --git a/tests/testfile53-32.debug.bz2 b/tests/testfile53-32.debug.bz2 new file mode 100755 index 000000000..79ea566d6 Binary files /dev/null and b/tests/testfile53-32.debug.bz2 differ diff --git a/tests/testfile53-32.prelink.bz2 b/tests/testfile53-32.prelink.bz2 new file mode 100755 index 000000000..8e05abf00 Binary files /dev/null and b/tests/testfile53-32.prelink.bz2 differ diff --git a/tests/testfile53-64.bz2 b/tests/testfile53-64.bz2 new file mode 100755 index 000000000..235a76319 Binary files /dev/null and b/tests/testfile53-64.bz2 differ diff --git a/tests/testfile53-64.debug.bz2 b/tests/testfile53-64.debug.bz2 new file mode 100755 index 000000000..675c6eaf6 Binary files /dev/null and b/tests/testfile53-64.debug.bz2 differ diff --git a/tests/testfile53-64.prelink.bz2 b/tests/testfile53-64.prelink.bz2 new file mode 100755 index 000000000..853aba788 Binary files /dev/null and b/tests/testfile53-64.prelink.bz2 differ diff --git a/tests/testfile53.bz2 b/tests/testfile53.bz2 deleted file mode 100755 index 2e0e74c8b..000000000 Binary files a/tests/testfile53.bz2 and /dev/null differ diff --git a/tests/testfile53.debug.bz2 b/tests/testfile53.debug.bz2 deleted file mode 100755 index ec36e9825..000000000 Binary files a/tests/testfile53.debug.bz2 and /dev/null differ diff --git a/tests/testfile53.prelink.bz2 b/tests/testfile53.prelink.bz2 deleted file mode 100755 index b2f4dea94..000000000 Binary files a/tests/testfile53.prelink.bz2 and /dev/null differ