diff options
-rw-r--r-- | ELF/OutputSections.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ELF/OutputSections.cpp b/ELF/OutputSections.cpp index d613df7cc..abfd32c0b 100644 --- a/ELF/OutputSections.cpp +++ b/ELF/OutputSections.cpp @@ -269,11 +269,11 @@ PltSection<ELFT>::PltSection() } template <class ELFT> void PltSection<ELFT>::writeTo(uint8_t *Buf) { - size_t Off = 0; // At beginning of PLT, we have code to call the dynamic linker // to resolve dynsyms at runtime. Write such code. Target->writePltZero(Buf); - Off += Target->PltZeroSize; + size_t Off = Target->PltZeroSize; + for (auto &I : Entries) { const SymbolBody *B = I.first; unsigned RelOff = I.second; |