diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-03 16:53:39 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-03 16:53:39 +0000 |
commit | 38a36c4f1ca7a0a42ac6524a9f0a5a701f3bc88a (patch) | |
tree | 69b1d0a26b847745fe182e161cd6c4883800ed31 | |
parent | bea6c5472355ebd43b644d5cb88f096ed5280a68 (diff) | |
download | bcm5719-llvm-38a36c4f1ca7a0a42ac6524a9f0a5a701f3bc88a.tar.gz bcm5719-llvm-38a36c4f1ca7a0a42ac6524a9f0a5a701f3bc88a.zip |
Simplify. NFC.
llvm-svn: 259660
-rw-r--r-- | lld/ELF/OutputSections.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index d8ec21c722a..8f3ab01b7d6 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -848,16 +848,12 @@ elf2::getLocalRelTarget(const ObjectFile<ELFT> &File, 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 |