diff options
| author | Fangrui Song <i@maskray.me> | 2025-01-30 22:24:04 -0800 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2025-01-30 22:24:04 -0800 |
| commit | d6fa74ab3d4cc77005836e72a2d6fe222bab4c59 (patch) | |
| tree | 304d9f2b520c435dc2835a5b14a059c452be1283 /lld/ELF/InputFiles.cpp | |
| parent | 3b2f4f4ab2d7a2008a3b0dcc46526429f7e29101 (diff) | |
[ELF] Merge exportDynamic/isExported and remove Symbol::includeInDynsym
Commit 3733ed6f1c6b0eef1e13e175ac81ad309fc0b080 introduced isExported to
cache includeInDynsym. If we don't unnecessarily set isExported for
undefined symbols, exportDynamic/includeInDynsym can be replaced with
isExported.
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 42d0e4c202ec..16943c484d96 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -1574,7 +1574,7 @@ template <class ELFT> void SharedFile::parse() { } Symbol *s = ctx.symtab->addSymbol( Undefined{this, name, sym.getBinding(), sym.st_other, sym.getType()}); - s->exportDynamic = true; + s->isExported = true; if (sym.getBinding() != STB_WEAK && ctx.arg.unresolvedSymbolsInShlib != UnresolvedPolicy::Ignore) requiredSymbols.push_back(s); @@ -1771,7 +1771,7 @@ static void createBitcodeSymbol(Ctx &ctx, Symbol *&sym, nullptr); // The definition can be omitted if all bitcode definitions satisfy // `canBeOmittedFromSymbolTable()` and isUsedInRegularObj is false. - // The latter condition is tested in Symbol::includeInDynsym. + // The latter condition is tested in parseVersionAndComputeIsPreemptible. sym->ltoCanOmit = objSym.canBeOmittedFromSymbolTable() && (!sym->isDefined() || sym->ltoCanOmit); sym->resolve(ctx, newSym); |
