From ccbccef5895f375feba088c603b3c6954b4ee3ba Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 11 Jan 2011 19:16:59 -0800 Subject: Add data-only prelink tests --- tests/ChangeLog | 7 ++++ tests/Makefile.am | 6 +++- tests/run-prelink-addr-test.sh | 71 +++++++++++++++++++++++++++++++++++++ tests/testfile54-32.noshdrs.so.bz2 | Bin 0 -> 416 bytes tests/testfile54-32.prelink.so.bz2 | Bin 0 -> 1035 bytes tests/testfile54-32.so.bz2 | Bin 0 -> 745 bytes tests/testfile54-32.so.debug.bz2 | Bin 0 -> 1009 bytes tests/testfile54-64.noshdrs.so.bz2 | Bin 0 -> 458 bytes tests/testfile54-64.prelink.so.bz2 | Bin 0 -> 1127 bytes tests/testfile54-64.so.bz2 | Bin 0 -> 799 bytes tests/testfile54-64.so.debug.bz2 | Bin 0 -> 1052 bytes 11 files changed, 83 insertions(+), 1 deletion(-) create mode 100755 tests/testfile54-32.noshdrs.so.bz2 create mode 100755 tests/testfile54-32.prelink.so.bz2 create mode 100755 tests/testfile54-32.so.bz2 create mode 100755 tests/testfile54-32.so.debug.bz2 create mode 100755 tests/testfile54-64.noshdrs.so.bz2 create mode 100755 tests/testfile54-64.prelink.so.bz2 create mode 100755 tests/testfile54-64.so.bz2 create mode 100755 tests/testfile54-64.so.debug.bz2 (limited to 'tests') 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 + * 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 < testmaps54-64 <