]> git.ipfire.org Git - thirdparty/glibc.git/commit
x86_64: Remove unneeded static PIE check for undefined weak diagnostic
authorFangrui Song <maskray@google.com>
Thu, 8 Jul 2021 21:26:22 +0000 (14:26 -0700)
committerFangrui Song <maskray@google.com>
Fri, 9 Jul 2021 04:46:59 +0000 (21:46 -0700)
commit737efa27fca5c97f566a2005687fda7d6659cd2e
treefa0e0b9fdf9d57a0a6ea6515e6908377b678bb19
parent27e892f6608e9d0da71884bb1422a735f6062850
x86_64: Remove unneeded static PIE check for undefined weak diagnostic

https://sourceware.org/bugzilla/show_bug.cgi?id=21782 dropped an ld
diagnostic for R_X86_64_PC32 referencing an undefined weak symbol in
-pie links.  Arguably keeping the diagnostic like other ports is more
correct, since statically resolving movl foo(%rip), %eax to the
link-time zero address produces a corrupted output.

It turns out that --enable-static-pie builds do not depend on the ld
behavior. GCC generates GOT indirection for weak declarations for
-fPIE/-fPIC, so what ld does with the PC-relative relocation doesn't
really matter.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 115d242456de158e698ffb0f9a5fee3118e9e825)
sysdeps/x86_64/configure [changed mode: 0644->0755]
sysdeps/x86_64/configure.ac