From 38c578854801fd9bda1eee44e6a8afcdc6ae6ce0 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 11 Aug 2019 13:32:46 +0000 Subject: [PATCH] [ELF] Remove unnecessary assignment to `used` in replaceWithDefined `Symbol::used` is used by Undefined and SharedSymbol to record if a .symtab entry is needed. It is of no use for Defined. llvm-svn: 368533 --- lld/ELF/Relocations.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index 7beef6ec125a..6dd1b4d68251 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -513,7 +513,6 @@ static void replaceWithDefined(Symbol &sym, SectionBase *sec, uint64_t value, sym.isPreemptible = true; sym.exportDynamic = true; sym.isUsedInRegularObj = true; - sym.used = true; } // Reserve space in .bss or .bss.rel.ro for copy relocation.