From: Fangrui Song Date: Sun, 11 Aug 2019 13:32:46 +0000 (+0000) Subject: [ELF] Remove unnecessary assignment to `used` in replaceWithDefined X-Git-Tag: llvmorg-11-init~12176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38c578854801fd9bda1eee44e6a8afcdc6ae6ce0;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index 7beef6e..6dd1b4d 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.