[ELF] Remove unnecessary assignment to `used` in replaceWithDefined
authorFangrui Song <maskray@google.com>
Sun, 11 Aug 2019 13:32:46 +0000 (13:32 +0000)
committerFangrui Song <maskray@google.com>
Sun, 11 Aug 2019 13:32:46 +0000 (13:32 +0000)
`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

index 7beef6e..6dd1b4d 100644 (file)
@@ -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.