[PATCH] D64906: [ELF][PPC] Allow PT_LOAD to have overlapping p_offset ranges

Troy Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 09:36:39 PDT 2019


troyj added a comment.

> If your program does not parse its program header, there should be no runtime perceivable behavior differences.

It parses the program header.  That's why it knows that there is more than one RW.  It's looking for a single RW so that it can mremap its data, but it's confused when it finds more than one RW.

> Merging 2 RW into one can be seen as an optimization, and lld does not support it.

Well....hold on.  lld used to emit one RW prior to that patch, and now it doesn't.  My issue is that I'm fine reverting the patch locally, but then RELRO overlaps the entire RW due to the rounding.  So far I've tried eliminating the rounding, but now I'm trying it with the rounding restored and attempting to insert a dummy section prior to .data. to push .data. up to the next page boundary.  I'm trying to figure that part out now, but it's not clear if I need to create it early as another synthetic section or if I can just create one in Writer.cpp.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64906/new/

https://reviews.llvm.org/D64906





More information about the llvm-commits mailing list