[lld] r270281 - Simplify. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 14:39:07 PDT 2016


Author: ruiu
Date: Fri May 20 16:39:07 2016
New Revision: 270281

URL: http://llvm.org/viewvc/llvm-project?rev=270281&view=rev
Log:
Simplify. NFC.

Modified:
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=270281&r1=270280&r2=270281&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri May 20 16:39:07 2016
@@ -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;




More information about the llvm-commits mailing list