[PATCH] D64906: [ELF][PPC] Allow PT_LOAD to have overlapping p_offset ranges
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 11:24:32 PDT 2019
MaskRay added a comment.
In D64906#1712768 <https://reviews.llvm.org/D64906#1712768>, @troyj wrote:
> Respectfully, I've read all of that plus https://www.airs.com/blog/archives/189, and we've arrived at different conclusions. I'm fine with maintaining a local patch; I just wanted to point it out in case it was useful to others upstream.
Can you be more specific about how this conflicts with the blog post? Out of curiosity I want to learn why your software needs a local patch. I am 90% certain that that specific software makes unfounded assumption about the section/segment layout. GNU ld places PT_GNU_RELRO starting at a maxpagesize boundary and ending at a commonpagesize boundary. The last page may be unprotected. I agree that https://reviews.llvm.org/D29242 is not very ideal but it does not matter in practice: if runtime pagesize is smaller than commonpagesize(4096 on all targets but SPARCV9 that are supported by lld; 4096 on most targets supported by GNU ld), it can segfault.
There some some other differences, e.g. lld has .bss.rel.ro when no SECTIONS command is used. This was motivated by //An Evil Copy: How the Loader Betrays You// (I really dislike the misleading and exaggerated title) GNU ld and gold haven't implemented this. 2 RW schemes play well with PT_GNU_RELRO. etc
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