binutils-gdb/ld/testsuite/ld-x86-64/mpx3n.dd
H.J. Lu f2c29a1692 x86-64: Rename .plt.bnd to .plt.sec
Rename .plt.bnd to .plt.sec to indicate that this is used as the second
PLT section.  There is no change in run-time behavior.  We also scan the
.plt.sec section to synthesize PLT symbols.

bfd/

	* elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
	to plt_second.
	(elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
	to plt_second/plt_second_eh_frame.
	(elf_x86_64_link_hash_newfunc): Updated.
	(elf_x86_64_allocate_dynrelocs): Likewise.
	(elf_x86_64_size_dynamic_sections): Likewise.
	(elf_x86_64_relocate_section): Likewise.
	(elf_x86_64_finish_dynamic_symbol): Likewise.
	(elf_x86_64_finish_dynamic_sections): Likewise.
	(elf_x86_64_plt_type): Rename plt_bnd to plt_second.
	(elf_x86_64_get_synthetic_symtab): Updated.  Also scan the
	.plt.sec section.
	(elf_backend_setup_gnu_properties): Updated.  Create the
	.plt.sec section instead of the .plt.sec section.

ld/

	* emulparams/elf_x86_64.sh (TINY_READONLY_SECTION): Replace
	.plt.bnd with .plt.sec.
	* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
	* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
	* testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
	* testsuite/ld-x86-64/mpx3.dd: Likewise.
	* testsuite/ld-x86-64/mpx3n.dd: Likewise.
	* testsuite/ld-x86-64/mpx4.dd: Likewise.
	* testsuite/ld-x86-64/mpx4n.dd: Likewise.
	* testsuite/ld-x86-64/plt-main-bnd-now.rd: Likewise.
	* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
	* testsuite/ld-x86-64/pr21038b.d: Likewise.
	* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
	* testsuite/ld-x86-64/pr21038c.d: Likewise.
2017-05-11 11:28:16 -07:00

29 lines
1.0 KiB
Plaintext

.*: +file format .*
Disassembly of section .plt:
0+400290 <.plt>:
+[a-f0-9]+: ff 35 a2 01 20 00 pushq 0x2001a2\(%rip\) # 600438 <_GLOBAL_OFFSET_TABLE_\+0x8>
+[a-f0-9]+: f2 ff 25 a3 01 20 00 bnd jmpq \*0x2001a3\(%rip\) # 600440 <_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 400290 <.plt>
+[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
Disassembly of section .plt.sec:
0+4002b0 <call1@plt>:
+[a-f0-9]+: f2 ff 25 91 01 20 00 bnd jmpq \*0x200191\(%rip\) # 600448 <call1>
+[a-f0-9]+: 90 nop
Disassembly of section .text:
0+4002b8 <_start>:
+[a-f0-9]+: bf b0 02 40 00 mov \$0x4002b0,%edi
+[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
+[a-f0-9]+: 48 8b 3d 89 01 20 00 mov 0x200189\(%rip\),%rdi # 600450 <call2>
+[a-f0-9]+: f2 ff d7 bnd callq \*%rdi
+[a-f0-9]+: c3 retq
#pass