[PATCH] D48405: [ELF] Assign RF_EXEC rank even if --no-rosegment or SECTIONS command is used

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 23:53:49 PDT 2018


echristo added inline comments.


================
Comment at: ELF/Writer.cpp:767
       Rank |= RF_EXEC_WRITE;
-    else if (!Config->SingleRoRx)
+    else
       Rank |= RF_EXEC;
----------------
MaskRay wrote:
> MaskRay wrote:
> > echristo wrote:
> > > Can you rebase this on the other patch and then add some comments about the ranking into the source?
> > D48406 is based on this one (which I'd like to collect some feedback about section reordering as fixing 60+ tests are painful)
> > 
> > This one D48405 is not dependent on the other.
> This patch merely removes code (the  `if (!Config->SingleRoRx)` condition). It is fairly obvious what it does.
> 
> I think `SingleRoRx` (true if --no-rosegment or SECTION command is used) should be an option that changes the segment layout (one more `PT_LOAD`), not an option that also changes section layout (so I think it should have been documented why the SingleRoRx flag disabled the RF_EXEC assignment). 
I agree with all of that. I'm still pretty sure that the comment above it needs to be updated :)


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D48405





More information about the llvm-commits mailing list