[PATCH] D13559: [ELF2] Use EntrySize, not 8, to advance the .plt buffer when writing

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 09:45:43 PDT 2015


hfinkel created this revision.
hfinkel added reviewers: ruiu, rafael.
hfinkel added a subscriber: llvm-commits.
hfinkel added a project: lld.

In preparation for making the size of a .plt entry target dependent, use the existing EntrySize variable when writing (instead of a hard-coded value). NFC.


http://reviews.llvm.org/D13559

Files:
  ELF/OutputSections.cpp

Index: ELF/OutputSections.cpp
===================================================================
--- ELF/OutputSections.cpp
+++ ELF/OutputSections.cpp
@@ -119,7 +119,7 @@
     uintptr_t InstPos = reinterpret_cast<uintptr_t>(Buf);
     uint64_t PltEntryAddr = (InstPos - Start) + this->getVA();
     Target->writePltEntry(Buf, GotEntryAddr, PltEntryAddr);
-    Buf += 8;
+    Buf += EntrySize;
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13559.36866.patch
Type: text/x-patch
Size: 404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151008/8047c3d3/attachment.bin>


More information about the llvm-commits mailing list