[PATCH] D18499: [ELF] - Implemented prototype of location counter support.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 11:31:04 PDT 2016


grimar added inline comments.

================
Comment at: ELF/LinkerScript.h:71
@@ +70,3 @@
+  template <class ELFT> void doLayout(std::vector<OutputSectionBase<ELFT> *> S);
+  uint64_t getSecVA(StringRef Name);
+  uint64_t getDummySecVA(size_t Ndx);
----------------
If so - yes.

================
Comment at: ELF/Writer.cpp:1417
@@ +1416,3 @@
+                     : (uintX_t)Script->getSecVA(Sec->getName());
+    Sec->setVA(VA);
+    ++I;
----------------
ruiu wrote:
> Why do we still have to call setVA from the Writer although I think the point of this patch is to do it in the linker script?
Misunderstanding :) I thought you want to have Script->getSecVA() method. 
Without that all life is easier of course.
Removed whole method.

================
Comment at: ELF/Writer.cpp:1421-1425
@@ +1420,7 @@
+
+  // Add space for section headers.
+  SectionHeaderOff = alignTo(FileOff, sizeof(uintX_t));
+  FileSize = SectionHeaderOff + getNumSections() * sizeof(Elf_Shdr);
+
+  setPhdrs();
+}
----------------
ruiu wrote:
> Do you still need this?
Nope. Removed.


http://reviews.llvm.org/D18499





More information about the llvm-commits mailing list