mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
9d1d54d5a7
When building PIE, we should only discard space for pc-relative relocs symbols which turn out to need copy relocs. bfd/ PR ld/17827 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE, only discard space for pc-relative relocs symbols which turn out to need copy relocs. ld/testsuite/ PR ld/17827 * ld-x86-64/pr17689.out: Updated. * ld-x86-64/pr17689b.S: Likewise. * ld-x86-64/pr17827.rd: New file. * ld-x86-64/x86-64.exp: Run PR ld/17827 test.
23 lines
370 B
ArmAsm
23 lines
370 B
ArmAsm
.text
|
|
.globl main
|
|
.type main, @function
|
|
main:
|
|
subq $8, %rsp
|
|
movq bar_alias(%rip), %rdi
|
|
call foo@PLT
|
|
movq ptr(%rip), %rax
|
|
movq (%rax), %rdi
|
|
call foo@PLT
|
|
xorl %eax, %eax
|
|
addq $8, %rsp
|
|
ret
|
|
.size main, .-main
|
|
.globl ptr
|
|
.section .data.rel,"aw",@progbits
|
|
.align 8
|
|
.type ptr, @object
|
|
.size ptr, 8
|
|
ptr:
|
|
.quad bar_alias
|
|
.section .note.GNU-stack,"",@progbits
|