[PATCH] D22455: [ELF] Create output sections in LinkerScript class
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 05:24:22 PDT 2016
evgeny777 added inline comments.
================
Comment at: ELF/LinkerScript.cpp:199
@@ -197,3 +198,3 @@
bool LinkerScript<ELFT>::isDiscarded(InputSectionBase<ELFT> *S) {
- return getOutputSection(S) == "/DISCARD/";
+ return !S || !S->Live || S->OutSec || getOutputSection(S) == "/DISCARD/";
}
----------------
grimar wrote:
> This method seems to be a almost copy of elf::isDiscarded(). Do you really need it then ?
elf::isDiscarded no longer calls LinkerScript::isDiscarded and does not check S->OutSec.
================
Comment at: ELF/Writer.cpp:92
@@ -91,1 +91,3 @@
+ OutputSectionList<ELFT> OwningSections;
+ OutputSectionFactory<ELFT> Factory;
----------------
grimar wrote:
> Looks you can leave Factory to be local object, it does not really needs to be member.
> You can just give it to createSections/finalizeSections. I have no real preference here though.
It holds name-value section map. See OutputSectionFactory::create()
Repository:
rL LLVM
https://reviews.llvm.org/D22455
More information about the llvm-commits
mailing list