Skip to content
Commit cce64d8d authored by H.J. Lu's avatar H.J. Lu
Browse files

x86-64: Disallow PC reloc against weak undefined symbols in PIE

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.

(cherry picked from commit 661b504d)
parent 26672a41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment