[lld] 01a5162 - [ELF] Slightly speed up Symbol::includeInDynsym. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 15 23:32:53 PST 2022
Author: Fangrui Song
Date: 2022-01-15T23:32:48-08:00
New Revision: 01a51629c29521ebe4b612b6c3f69bd23b7034a5
URL: https://github.com/llvm/llvm-project/commit/01a51629c29521ebe4b612b6c3f69bd23b7034a5
DIFF: https://github.com/llvm/llvm-project/commit/01a51629c29521ebe4b612b6c3f69bd23b7034a5.diff
LOG: [ELF] Slightly speed up Symbol::includeInDynsym. NFC
Added:
Modified:
lld/ELF/Symbols.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 2be5e8d9510c..e3c919517210 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -286,7 +286,7 @@ bool Symbol::includeInDynsym() const {
// expects undefined weak symbols not to exist in .dynsym, e.g.
// __pthread_mutex_lock reference in _dl_add_to_namespace_list,
// __pthread_initialize_minimal reference in csu/libc-start.c.
- return !(config->noDynamicLinker && isUndefWeak());
+ return !(isUndefWeak() && config->noDynamicLinker);
return exportDynamic || inDynamicList;
}
More information about the llvm-commits
mailing list