diff options
-rw-r--r-- | lld/ELF/InputSection.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/Symbols.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 9814de9f278..458b772ae4f 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -142,9 +142,9 @@ uint64_t SectionBase::getOffset(uint64_t Offset) const { return Offset == uint64_t(-1) ? OS->Size : Offset; } case Regular: - return cast<InputSection>(this)->OutSecOff + Offset; + return cast<InputSection>(this->Repl)->OutSecOff + Offset; case Synthetic: { - auto *IS = cast<InputSection>(this); + auto *IS = cast<InputSection>(this->Repl); // For synthetic sections we treat offset -1 as the end of the section. return IS->OutSecOff + (Offset == uint64_t(-1) ? IS->getSize() : Offset); } diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp index dccd3a73352..3bcbe03bf6b 100644 --- a/lld/ELF/Symbols.cpp +++ b/lld/ELF/Symbols.cpp @@ -56,7 +56,6 @@ static uint64_t getSymVA(const Symbol &Sym, int64_t &Addend) { if (!IS) return D.Value; - IS = IS->Repl; uint64_t Offset = D.Value; // An object in an SHF_MERGE section might be referenced via a |