diff options
Diffstat (limited to 'lld/ELF/InputSection.cpp')
-rw-r--r-- | lld/ELF/InputSection.cpp | 4 |
1 files changed, 2 insertions, 2 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); } |