[PATCH] D13486: ELF2; Make singleton output sections globally accessible

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 09:15:00 PDT 2015


ruiu added inline comments.

================
Comment at: ELF/InputSection.cpp:40
@@ -39,3 +37,2 @@
     uint32_t Type = RI.getType(IsMips64EL);
-    uintX_t GotVA = GotSec.getVA();
     uintX_t SymVA;
----------------
rafael wrote:
> Why remove this?
I'll revert this change.

================
Comment at: ELF/InputSection.h:78
@@ -77,3 +72,3 @@
 
-  OutputSection<ELFT> *Out = nullptr;
 
----------------
rafael wrote:
> Independent change. Please commit the rename first.
`Out` conflicts with the global varaible `Out`, so we have to rename this. Technically we can use ::Out<ELFT>:: to refer to the global Out and Out for local variable Out, but that's confusing.

================
Comment at: ELF/OutputSections.h:158
@@ -157,3 @@
-
-  void finalize() override {
-    this->Header.sh_size = getNumSymbols() * sizeof(Elf_Sym);
----------------
rafael wrote:
> Moving it out of line is good, but please do it in a independent cleanup patch first.
OK, I'll submit a clean up change first. This is needed before this patch because this contains StrTabSec.


http://reviews.llvm.org/D13486





More information about the llvm-commits mailing list