mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
aab921adcb
-fPIC may be needed to compile PIE or PDE objects, not just shared object. bfd/ * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for bfd_link_info. Report shared, PIE or PDE object based on bfd_link_info. (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call. (elf_x86_64_relocate_section): Likewise. ld/ * testsuite/ld-x86-64/pie2.d: Updated. * testsuite/ld-x86-64/pr19719.d: Likewise. * testsuite/ld-x86-64/pr19807-2a.d: Likewise. * testsuite/ld-x86-64/pr19969.d: Likewise.
5 lines
166 B
D
5 lines
166 B
D
#source: pr19807-2.s
|
|
#as: --64
|
|
#ld: -pie -melf_x86_64
|
|
#error: .*relocation R_X86_64_32 against `.data' can not be used when making a PIE object; recompile with -fPIC
|