[lld] d31fb26 - [ELF] Simplify includeInDynsym for --dynamic-list
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 7 22:57:30 PST 2024
Author: Fangrui Song
Date: 2024-12-07T22:57:25-08:00
New Revision: d31fb264821ceac90b55c87c3f777053ab30a9af
URL: https://github.com/llvm/llvm-project/commit/d31fb264821ceac90b55c87c3f777053ab30a9af
DIFF: https://github.com/llvm/llvm-project/commit/d31fb264821ceac90b55c87c3f777053ab30a9af.diff
LOG: [ELF] Simplify includeInDynsym for --dynamic-list
Added:
Modified:
lld/ELF/SymbolTable.cpp
lld/ELF/Symbols.cpp
Removed:
################################################################################
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp
index f76ca0a9faf52f..648da94989d7a4 100644
--- a/lld/ELF/SymbolTable.cpp
+++ b/lld/ELF/SymbolTable.cpp
@@ -203,7 +203,7 @@ void SymbolTable::handleDynamicList() {
syms = findByVersion(ver);
for (Symbol *sym : syms)
- sym->inDynamicList = true;
+ sym->exportDynamic = sym->inDynamicList = true;
}
}
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index c520c5912ec4fb..b9069f14ea6e3c 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -278,7 +278,7 @@ bool Symbol::includeInDynsym(Ctx &ctx) const {
// __pthread_initialize_minimal reference in csu/libc-start.c.
return !(isUndefWeak() && ctx.arg.noDynamicLinker);
- return exportDynamic || inDynamicList;
+ return exportDynamic;
}
// Print out a log message for --trace-symbol.
More information about the llvm-commits
mailing list