diff options
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index d613df7ccf3..abfd32c0b7d 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/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; |

