diff options
| author | Josh Stone <[email protected]> | 2013-11-18 14:29:35 -0800 |
|---|---|---|
| committer | Josh Stone <[email protected]> | 2013-11-18 14:29:35 -0800 |
| commit | db35c87a85aa651b8ea3ed19689c53cefc28e313 (patch) | |
| tree | e880f0849642b2772ba4837f6df36d5ebb232026 /tests | |
| parent | 68ce4fc85bbf95441e96fedd76c8bd78f76d8da2 (diff) | |
libdwfl: Fix and test aux_sym address_sync with relocated ELF
The aux_sym address_sync already worked with a full prelink, which has
.gnu.prelink_undo, but it failed on plain relocations with prelink -r.
Now it uses the difference in ehdr.e_entry as a first offset guess, and
the tests confirm this seems to work fine.
Signed-off-by: Josh Stone <[email protected]>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 7 | ||||
| -rw-r--r-- | tests/Makefile.am | 1 | ||||
| -rwxr-xr-x | tests/run-dwflsyms.sh | 10 | ||||
| -rwxr-xr-x | tests/testfilebazdbg_plr.bz2 | bin | 0 -> 2241 bytes | |||
| -rwxr-xr-x | tests/testfilebazmin_plr.bz2 | bin | 0 -> 3337 bytes |
5 files changed, 18 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index 9461287a..9a8ac613 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,10 @@ +2013-11-18 Josh Stone <[email protected]> + + * testfilebazdbg_plr.bz2: New testfile. + * testfilebazmin_plr.bz2: Likewise. + * Makefile.am (EXTRA_DIST): Add the above files. + * run-dwflsyms.sh: Add prelink -r tests. + 2013-11-15 Mark Wielaard <[email protected]> * testfilebazmdb.bz2: Regenerated. diff --git a/tests/Makefile.am b/tests/Makefile.am index e9cf950c..4f8e9e49 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -190,6 +190,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfilebazmin.bz2 testfilebazdbg.debug.bz2 testfilebazmdb.bz2 \ testfilebaztab.bz2 testfilebasmin.bz2 \ testfilebazdbg_pl.bz2 testfilebazmin_pl.bz2 \ + testfilebazdbg_plr.bz2 testfilebazmin_plr.bz2 \ run-dwflsyms.sh \ run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \ run-low_high_pc.sh testfile_low_high_pc.bz2 \ diff --git a/tests/run-dwflsyms.sh b/tests/run-dwflsyms.sh index a425277c..2adec5a3 100755 --- a/tests/run-dwflsyms.sh +++ b/tests/run-dwflsyms.sh @@ -19,14 +19,18 @@ # Tests dwfl_module_{addrsym,getsym,relocate_address} # See run-readelf-s.sh for how to generate test binaries. +# In addition, *_pl files were created from their base file +# with prelink -N, and *_plr with prelink -r 0x4200000000. testfiles testfilebaztab testfiles testfilebazdbg testfilebazdbg.debug testfiles testfilebazdbg_pl +testfiles testfilebazdbg_plr testfiles testfilebazdyn testfiles testfilebazmdb testfiles testfilebazmin testfiles testfilebazmin_pl +testfiles testfilebazmin_plr testfiles testfilebasmin tempfiles testfile.dynsym.in testfile.symtab.in testfile.minsym.in dwflsyms.out @@ -328,6 +332,9 @@ cat testfile.symtab.in \ cat testfile.symtab_pl.in \ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbg_pl +sed s/0x3000/0x4200/g testfile.symtab_pl.in \ + | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbg_plr + cat testfile.dynsym.in \ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdyn @@ -340,6 +347,9 @@ cat testfile.minsym.in \ cat testfile.minsym_pl.in \ | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmin_pl +sed s/0x3000/0x4200/g testfile.minsym_pl.in \ + | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmin_plr + testrun_compare ${abs_builddir}/dwflsyms -e testfilebasmin <<\EOF 0: NOTYPE LOCAL (0) 0 1: FUNC LOCAL foo (18) 0x400168, rel: 0x400168 diff --git a/tests/testfilebazdbg_plr.bz2 b/tests/testfilebazdbg_plr.bz2 Binary files differnew file mode 100755 index 00000000..1bc43dd2 --- /dev/null +++ b/tests/testfilebazdbg_plr.bz2 diff --git a/tests/testfilebazmin_plr.bz2 b/tests/testfilebazmin_plr.bz2 Binary files differnew file mode 100755 index 00000000..e4fcf85d --- /dev/null +++ b/tests/testfilebazmin_plr.bz2 |
