aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-05-20 21:39:07 +0000
committerRui Ueyama <ruiu@google.com>2016-05-20 21:39:07 +0000
commit9f42f135cc266d7dc5dca84fb9efdc46cf465b23 (patch)
treeb6a8dbcf2ae3d60ac42e93d525262d1b87c7ee19
parentd48e1495081199f748ce7c55c19afc62bd80a8d5 (diff)
Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@270281 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--ELF/OutputSections.cpp4
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;