mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
338c190a92
Since elf_x86_64_check_relocs is called after opening all input files, we can detect dynamic R_X86_64_32 relocation overflow there. bfd/ PR ld/19969 * elf64-x86-64.c (check_relocs_failed): New. (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs. Support relocation agaist local symbol. Set check_relocs_failed. (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check R_X86_64_32 relocation overflow. (elf_x86_64_relocate_section): Skip if check_relocs failed. Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic. ld/ PR ld/19969 * testsuite/ld-x86-64/pr19969.d: New file. * testsuite/ld-x86-64/pr19969a.S: Likewise. * testsuite/ld-x86-64/pr19969b.S: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pr19969 tests.
15 lines
195 B
ArmAsm
15 lines
195 B
ArmAsm
.text
|
|
.globl _start
|
|
.type _start, @function
|
|
_start:
|
|
movl foo_p(%rip), %eax
|
|
ret
|
|
.size _start, .-_start
|
|
.globl foo_p
|
|
.data
|
|
.align 4
|
|
.type foo_p, @object
|
|
.size foo_p, 4
|
|
foo_p:
|
|
.long foo
|