aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/mpx.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-07-16 08:16:24 -0700
committerH.J. Lu <hjl.tools@gmail.com>2014-07-16 10:57:49 -0700
commit144bed8d4d8a1bdc0067f55f2ee71c07e5594677 (patch)
treed4f7b7298150ad44133ef5b04eaa363f045225d3 /ld/testsuite/ld-x86-64/mpx.exp
parent4d974e8854dbc506f154efca8879da3f310bb2b9 (diff)
downloadgdb-144bed8d4d8a1bdc0067f55f2ee71c07e5594677.zip
gdb-144bed8d4d8a1bdc0067f55f2ee71c07e5594677.tar.gz
gdb-144bed8d4d8a1bdc0067f55f2ee71c07e5594677.tar.bz2
Properly match PLT entry against .got.plt relocation
Relocations against .got.plt section may not be in the same order as entries in PLT section. It is incorrect to assume that the Ith reloction index against .got.plt section always maps to the (I + 1)th entry in PLT section. This patch matches the .got.plt relocation offset/index in PLT entry against the index in .got.plt relocation table. It only checks R_*_JUMP_SLOT and R_*_IRELATIVE relocations. It ignores R_*_TLS_DESC and R_*_TLSDESC relocations since they have different PLT entries. bfd/ PR binutils/17154 * elf32-i386.c (elf_i386_plt_sym_val): Only match R_*_JUMP_SLOT and R_*_IRELATIVE relocation offset with PLT entry. * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise. (elf_x86_64_plt_sym_val_offset_plt_bnd): New. (elf_x86_64_get_synthetic_symtab): Use it. ld/testsuite/ PR binutils/17154 * ld-ifunc/pr17154-i386.d: New file. * ld-ifunc/pr17154-x86-64.d: Likewise. * ld-ifunc/pr17154-x86.s: Likewise. * ld-x86-64/bnd-ifunc-2.d: Likewise. * ld-x86-64/bnd-ifunc-2.s: Likewise. * ld-x86-64/mpx.exp: Run bnd-ifunc-2. * ld-x86-64/tlsdesc-nacl.pd: Updated. * ld-x86-64/tlsdesc.pd: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64/mpx.exp')
-rw-r--r--ld/testsuite/ld-x86-64/mpx.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/mpx.exp b/ld/testsuite/ld-x86-64/mpx.exp
index 3224048..f2a50d4 100644
--- a/ld/testsuite/ld-x86-64/mpx.exp
+++ b/ld/testsuite/ld-x86-64/mpx.exp
@@ -78,4 +78,5 @@ run_ld_link_exec_tests [] $run_tests
run_dump_test "bnd-branch-1"
run_dump_test "bnd-ifunc-1"
+run_dump_test "bnd-ifunc-2"
run_dump_test "bnd-plt-1"