binutils-gdb/ld/testsuite/ld-x86-64/pr20800b.S
H.J. Lu 9d734efa10 Also check GOT PLT for R_X86_64_PLTOFF64
Since "-z now" replaces PLT with GOT PLT, we should also check GOT PLT
for R_X86_64_PLTOFF64 relocation.

bfd/

	PR ld/20800
	* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
	plt_got.offset for R_X86_64_PLTOFF64.

ld/

	PR ld/20800
	* testsuite/ld-x86-64/pr20800a.S: New file.
	* testsuite/ld-x86-64/pr20800b.S: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run PR ld/20800 test.
2016-11-14 10:13:03 -08:00

22 lines
406 B
ArmAsm

.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "PASS\n"
.text
.globl bar
.type bar, @function
bar:
.L2:
leaq .L2(%rip), %rdx
movabsq $_GLOBAL_OFFSET_TABLE_-.L2, %r11
movabsq $.LC0@GOTOFF, %rax
pushq %r15
movabsq $printf@PLTOFF, %rcx
addq %r11, %rdx
popq %r15
leaq (%rdx,%rax), %rdi
addq %rdx, %rcx
xorl %eax, %eax
jmp *%rcx
.size bar, .-bar
.section .note.GNU-stack,"",@progbits