mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
661b504df9
Disallow PC relocations against weak undefined symbols in PIE since they can lead to non-zero address at run-time. bfd/ PR ld/21782 * elf64-x86-64.c (elf_x86_64_relocate_section): Disallow PC relocations against weak undefined symbols in PIE. ld/ PR ld/21782 * testsuite/ld-x86-64/pie3.d: Expect linker error.
4 lines
225 B
Makefile
4 lines
225 B
Makefile
#as: --64
|
|
#ld: -pie -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code
|
|
#error: .*relocation R_X86_64_PC32 against undefined symbol `foo' can not be used when making a PIE object; recompile with -fPIE
|