diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index a8a08da3b09c13..4042ca1a631c46 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.