[PATCH] D23352: [ELF] - Linkerscript: implemented simple heuristic for placing orphan sections.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 06:59:29 PDT 2016


grimar added inline comments.

================
Comment at: ELF/LinkerScript.cpp:257
@@ +256,3 @@
+template <class ELFT>
+static typename ELFT::uint getAccessFlags(OutputSectionBase<ELFT> *Sec) {
+  return Sec->getFlags() & (SHF_WRITE | SHF_ALLOC | SHF_EXECINSTR);
----------------
ruiu wrote:
> Let's name this `getPermissions` as this is RWX permissions.
Done.

================
Comment at: ELF/LinkerScript.cpp:270
@@ +269,3 @@
+  bool IsNew;
+  OutputSectionBase<ELFT> *Orphan;
+  std::tie(Orphan, IsNew) = Factory.create(C, OutputName);
----------------
ruiu wrote:
> Orphan sections are a concept of input sections. I don't think we call output sections containing orphan sections as orphan sections. So let's name this OutSec.
Done.


https://reviews.llvm.org/D23352





More information about the llvm-commits mailing list