[all-commits] [llvm/llvm-project] 96e237: [ELF] Don't special case weak symbols for pie with...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Jan 8 09:40:51 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 96e2376d02f0840e82b96314108660ecabe63c7f
https://github.com/llvm/llvm-project/commit/96e2376d02f0840e82b96314108660ecabe63c7f
Author: Fangrui Song <maskray at google.com>
Date: 2020-01-08 (Wed, 08 Jan 2020)
Changed paths:
M lld/ELF/Symbols.cpp
M lld/test/ELF/ppc32-weak-undef-call.s
R lld/test/ELF/weak-undef-no-shared-libs.s
Log Message:
-----------
[ELF] Don't special case weak symbols for pie with no shared objects
D59275 added the following clause to Symbol::includeInDynsym()
if (isUndefWeak() && Config->Pie && SharedFiles.empty())
return false;
D59549 explored the possibility to generalize it for -no-pie.
GNU ld's rules are architecture dependent and partly controlled by -z
{,no-}dynamic-undefined-weak. Our attempts to mimic its rules are
actually half-baked and don't provide perceivable benefits (it can save
a few more weak undefined symbols in .dynsym in a -static-pie
executable). Let's just delete the rule for simplicity. We will expect
cosmetic inconsistencies with ld.bfd in certain -static-pie scenarios.
This permits a simplification in D71795.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D71794
More information about the All-commits
mailing list