[lld] r287751 - [ELF] Fixup buffer pointer when writing synthetic sections

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 01:47:39 PST 2016


Author: evgeny777
Date: Wed Nov 23 03:47:38 2016
New Revision: 287751

URL: http://llvm.org/viewvc/llvm-project?rev=287751&view=rev
Log:
[ELF] Fixup buffer pointer when writing synthetic sections

Differential revision: https://reviews.llvm.org/D26980

Modified:
    lld/trunk/ELF/InputSection.cpp

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=287751&r1=287750&r2=287751&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Wed Nov 23 03:47:38 2016
@@ -532,7 +532,7 @@ template <class ELFT> void InputSection<
     return;
 
   if (auto *S = dyn_cast<SyntheticSection<ELFT>>(this)) {
-    S->writeTo(Buf);
+    S->writeTo(Buf + OutSecOff);
     return;
   }
 




More information about the llvm-commits mailing list