mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-18 23:03:29 +08:00
c5bb8910e8
When building an executable, undefined symbols are error and undefined weak symbols are resolved to zero. We only need to check PIC for building a shared library. bfd/ PR ld/21782 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check to shared library. ld/ PR ld/21782 * testsuite/ld-x86-64/pie3-nacl.d: New file. * testsuite/ld-x86-64/pie3.d: Likewise. * testsuite/ld-x86-64/pie3.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run pie3 and pie3-nacl.
6 lines
64 B
ArmAsm
6 lines
64 B
ArmAsm
.text
|
|
.global _start
|
|
.weak foo
|
|
_start:
|
|
leaq foo(%rip), %rax
|