[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/22269] Undefined weak symbols isn't resolved to 0 in static PIE |
Date: |
Mon, 13 Jan 2020 15:57:14 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22269
--- Comment #41 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The binutils-2_33-branch branch has been updated by Szabolcs Nagy
<address@hidden>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6fbcfe4762c3732339cffd82426d00d35382b858
commit 6fbcfe4762c3732339cffd82426d00d35382b858
Author: Szabolcs Nagy <address@hidden>
Date: Thu Jan 9 17:20:56 2020 +0000
[PR ld/22269] arm: Avoid dynamic relocs for undefweak symbols in static PIE
With static PIE linking undefined weak symbols are resolved to 0, so no
dynamic relocation is needed for them. The UNDEFWEAK_NO_DYNAMIC_RELOC
macro was introduced so this case can be handled easily, but it was not
applied consistently in the first attempt to fix ld/22269 for arm:
commit 95b03e4ad68e7a90f5096b47df595636344b783a
arm: Check UNDEFWEAK_NO_DYNAMIC_RELOC
This patch fixes spurious relative relocs in static PIE binaries against
GOT entries created for undefined weak symbols on arm*-*, this fixes
FAIL: pr22269-1 (static pie undefined weak)
bfd/ChangeLog:
Backported from master
2020-01-10 Szabolcs Nagy <address@hidden>
PR ld/22269
* elf32-arm.c (elf32_arm_final_link_relocate): Use
UNDEFWEAK_NO_DYNAMIC_RELOC.
(allocate_dynrelocs_for_symbol): Likewise.
--
You are receiving this mail because:
You are on the CC list for the bug.