[lld] 764cd49 - [ELF] Simplify shouldKeepInSymtab after Symbol::used is false by default. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 5 11:21:50 PST 2022
Author: Fangrui Song
Date: 2022-02-05T11:21:44-08:00
New Revision: 764cd491b126318add093c7c8ba3884967d64b21
URL: https://github.com/llvm/llvm-project/commit/764cd491b126318add093c7c8ba3884967d64b21
DIFF: https://github.com/llvm/llvm-project/commit/764cd491b126318add093c7c8ba3884967d64b21.diff
LOG: [ELF] Simplify shouldKeepInSymtab after Symbol::used is false by default. NFC
Added:
Modified:
lld/ELF/Writer.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index a8a08da3b09c..4042ca1a631c 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -639,7 +639,7 @@ static bool shouldKeepInSymtab(const Defined &sym) {
// If --emit-reloc or -r is given, preserve symbols referenced by relocations
// from live sections.
- if (config->copyRelocs && sym.used)
+ if (sym.used)
return true;
// Exclude local symbols pointing to .ARM.exidx sections.
More information about the llvm-commits
mailing list