diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index b8946d8be8ba..27d1033b2ec9 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -532,7 +532,7 @@ template void InputSection::writeTo(uint8_t *Buf) { return; if (auto *S = dyn_cast>(this)) { - S->writeTo(Buf); + S->writeTo(Buf + OutSecOff); return; }