[PATCH] [lld][PECOFF] Read relocation entries.

Rui Ueyama ruiu at google.com
Thu Jun 13 18:05:18 PDT 2013



================
Comment at: lib/ReaderWriter/PECOFF/WriterPECOFF.cpp:494-500
@@ -356,5 +493,9 @@
     // Create file chunks and add them to the list.
-    Chunk *dosStub(new DOSStubChunk());
-    PEHeaderChunk *peHeader(new PEHeaderChunk(_PECOFFTargetInfo));
-    Chunk *dataDirectoryHeader(new DataDirectoryChunk());
-    SectionHeaderTableChunk *sectionTable(new SectionHeaderTableChunk());
+    auto *dosStub = new DOSStubChunk();
+    auto *peHeader = new PEHeaderChunk(_PECOFFTargetInfo);
+    auto *dataDirectory = new DataDirectoryChunk();
+    auto *sectionTable = new SectionHeaderTableChunk();
+    auto *text = new TextSectionChunk(linkedFile, sectionTable);
+    auto *rdata = new RDataSectionChunk(linkedFile, sectionTable);
+    auto *data = new DataSectionChunk(linkedFile, sectionTable);
+
----------------
Michael Spencer wrote:
> delete?
They are going to be managed by unique pointers at line 484.


http://llvm-reviews.chandlerc.com/D976

BRANCH
  data-section2

ARCANIST PROJECT
  lld



More information about the llvm-commits mailing list