mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
lld: Don't mark a shared library as needed because of a lazy symbol.
Obtained from: LLVM r323221 by Rafael Espíndola
This commit is contained in:
parent
6c41d54855
commit
da1eeb70d3
1 changed files with 2 additions and 1 deletions
|
|
@ -491,12 +491,13 @@ void SymbolTable::addShared(StringRef Name, SharedFile<ELFT> &File,
|
|||
if (WasInserted || ((S->isUndefined() || S->isLazy()) &&
|
||||
S->getVisibility() == STV_DEFAULT)) {
|
||||
uint8_t Binding = S->Binding;
|
||||
bool WasUndefined = S->isUndefined();
|
||||
replaceSymbol<SharedSymbol>(S, File, Name, Sym.getBinding(), Sym.st_other,
|
||||
Sym.getType(), Sym.st_value, Sym.st_size,
|
||||
Alignment, VerdefIndex);
|
||||
if (!WasInserted) {
|
||||
S->Binding = Binding;
|
||||
if (!S->isWeak() && !Config->GcSections)
|
||||
if (!S->isWeak() && !Config->GcSections && WasUndefined)
|
||||
File.IsNeeded = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue