[PATCH] D34956: [ELF] - Store pointer to PT_LOAD instead of pointer to first section (FirstInPtLoad) in OutputSection
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 03:00:04 PDT 2017
grimar added inline comments.
================
Comment at: ELF/LinkerScript.cpp:728
+static OutputSection *getFirstSection(PhdrEntry *Load) {
+ for (OutputSection *Sec : OutputSections)
----------------
ruiu wrote:
> I'd name this `findSection` as it finds a given argument from a list. "get" prefix doesn't feel perfectly match to what this function does.
Did you mean `findFirstSection` ? (as it finds first section in a given `Load`)
================
Comment at: ELF/OutputSections.h:71
+ // section in PT_LOAD.
+ PhdrEntry *Load = nullptr;
----------------
ruiu wrote:
> grimar wrote:
> > ruiu wrote:
> > > `Load` is not a good name, no? `Phdr` is better.
> > `Phdr` stands for "program header", there are lot of them, isn't it too generic name ?
> > We want to store pointer to loadable segment section resides in, so may be `LoadPhdr` or `PtLoad`
> > is better ?
> I think I prefer PtLoad over LoadPhdr.
Renamed to `PtLoad`.
https://reviews.llvm.org/D34956
More information about the llvm-commits
mailing list