[PATCH] D18499: [ELF] - Implemented prototype of location counter support.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 11:06:26 PDT 2016
ruiu 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);
----------------
Why do you need this function? If the linker script directly assign VAs to sections, we don't need this.
================
Comment at: ELF/Writer.cpp:1417
@@ +1416,3 @@
+ : (uintX_t)Script->getSecVA(Sec->getName());
+ Sec->setVA(VA);
+ ++I;
----------------
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?
================
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();
+}
----------------
Do you still need this?
http://reviews.llvm.org/D18499
More information about the llvm-commits
mailing list