[lld] r259660 - Simplify. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 3 08:53:40 PST 2016
Author: rafael
Date: Wed Feb 3 10:53:39 2016
New Revision: 259660
URL: http://llvm.org/viewvc/llvm-project?rev=259660&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=259660&r1=259659&r2=259660&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed Feb 3 10:53:39 2016
@@ -848,16 +848,12 @@ elf2::getLocalRelTarget(const ObjectFile
if (Section == &InputSection<ELFT>::Discarded || !Section->isLive())
return Addend;
- uintX_t VA = Section->OutSec->getVA();
- if (isa<InputSection<ELFT>>(Section))
- return VA + Section->getOffset(*Sym) + Addend;
-
uintX_t Offset = Sym->st_value;
if (Sym->getType() == STT_SECTION) {
Offset += Addend;
Addend = 0;
}
- return VA + Section->getOffset(Offset) + Addend;
+ return Section->OutSec->getVA() + Section->getOffset(Offset) + Addend;
}
// Returns true if a symbol can be replaced at load-time by a symbol
More information about the llvm-commits
mailing list