diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-05-11 07:42:30 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-05-11 07:45:59 -0700 |
commit | dc2be3d2f6de530aac40983e79e29e050f40e759 (patch) | |
tree | 07603beeba1b30451b6608cbfe6e6944f288b938 /ld/testsuite/ld-x86-64/pr21038b-now.d | |
parent | f96f371cbb33454544a9f1827c239c4375f0b60e (diff) | |
download | gdb-dc2be3d2f6de530aac40983e79e29e050f40e759.zip gdb-dc2be3d2f6de530aac40983e79e29e050f40e759.tar.gz gdb-dc2be3d2f6de530aac40983e79e29e050f40e759.tar.bz2 |
x86: Generate PLT relocations for -z now
This patch partially reverses:
commit 25070364b0ce33eed46aa5d78ebebbec6accec7e
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sat May 16 07:00:21 2015 -0700
Don't generate PLT relocations for now binding
to support LD_AUDIT and LD_PROFILE with -z now. If there is an existing
GOT relocation, it is still used to avoid PLT relocation against the same
function symbol.
bfd/
* elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
ld/
* testsuite/ld-i386/plt-pic2.dd: Updated.
* testsuite/ld-i386/plt2.dd: Likewise.
* testsuite/ld-i386/plt2.rd: Likewise.
* testsuite/ld-i386/pr17689now.rd: Likewise.
* testsuite/ld-ifunc/ifunc-16-i386-now.d: Likewise.
* testsuite/ld-ifunc/ifunc-16-x86-64-now.d: Likewise.
* testsuite/ld-ifunc/pr17154-i386-now.d: Likewise.
* testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise.
* testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise.
* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
* testsuite/ld-x86-64/plt2.dd: Likewise.
* testsuite/ld-x86-64/plt2.rd: Likewise.
* testsuite/ld-x86-64/pr17689now.rd: Likewise.
* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64/pr21038b-now.d')
-rw-r--r-- | ld/testsuite/ld-x86-64/pr21038b-now.d | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/ld/testsuite/ld-x86-64/pr21038b-now.d b/ld/testsuite/ld-x86-64/pr21038b-now.d index 562c7f1..2bafb8d 100644 --- a/ld/testsuite/ld-x86-64/pr21038b-now.d +++ b/ld/testsuite/ld-x86-64/pr21038b-now.d @@ -21,7 +21,7 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000238..000000000000023d +0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000248..000000000000024d DW_CFA_nop DW_CFA_nop DW_CFA_nop @@ -30,7 +30,7 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -0+30 0000000000000024 00000034 FDE cie=00000000 pc=0000000000000220..0000000000000230 +0+30 0000000000000024 00000034 FDE cie=00000000 pc=0000000000000220..0000000000000240 DW_CFA_def_cfa_offset: 16 DW_CFA_advance_loc: 6 to 0000000000000226 DW_CFA_def_cfa_offset: 24 @@ -41,11 +41,7 @@ Contents of the .eh_frame section: DW_CFA_nop DW_CFA_nop -0+58 0000000000000014 0000005c FDE cie=00000000 pc=0000000000000230..0000000000000238 - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop - DW_CFA_nop +0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000240..0000000000000248 DW_CFA_nop DW_CFA_nop DW_CFA_nop @@ -57,15 +53,18 @@ Disassembly of section .plt: +[a-f0-9]+: ff 35 c2 0d 20 00 pushq 0x200dc2\(%rip\) # 200fe8 <_GLOBAL_OFFSET_TABLE_\+0x8> +[a-f0-9]+: f2 ff 25 c3 0d 20 00 bnd jmpq \*0x200dc3\(%rip\) # 200ff0 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 00 nopl \(%rax\) + +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 + +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmpq 220 <.plt> + +[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\) -Disassembly of section .plt.got: +Disassembly of section .plt.bnd: -0+230 <func@plt>: - +[a-f0-9]+: f2 ff 25 c1 0d 20 00 bnd jmpq \*0x200dc1\(%rip\) # 200ff8 <func> +0+240 <func@plt>: + +[a-f0-9]+: f2 ff 25 b1 0d 20 00 bnd jmpq \*0x200db1\(%rip\) # 200ff8 <func> +[a-f0-9]+: 90 nop Disassembly of section .text: -0+238 <foo>: - +[a-f0-9]+: e8 f3 ff ff ff callq 230 <func@plt> +0+248 <foo>: + +[a-f0-9]+: e8 f3 ff ff ff callq 240 <func@plt> #pass |