[PATCH] D23352: [ELF] - Linkerscript: implemented simple heuristic for placing orphan sections.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 09:31:29 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/LinkerScript.cpp:282
@@ +281,3 @@
+ InputSectionBase<ELFT> *C) {
+ bool IsNew;
+ OutputSectionBase<ELFT> *OutSec;
----------------
That's what you are doing, but why do you have to do that?
================
Comment at: ELF/LinkerScript.cpp:307
@@ +306,3 @@
+ OutSecCmd->OutputSection = OutSec;
+ ScriptConfig->Commands.emplace(Pos, OutSecCmd);
+}
----------------
What I meant by "parallel array", I meant `ScriptConfig->Commands` and `OutputSections`. You are inserting new elements as you create new output sections, so you are still maintaining them as a parallel array. Is this intended?
https://reviews.llvm.org/D23352
More information about the llvm-commits
mailing list