[PATCH] D64930: [ELF][AArch64] Allow PT_LOAD to have overlapping p_offset ranges

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 07:29:16 PDT 2019


MaskRay added a comment.

In D64930#1642854 <https://reviews.llvm.org/D64930#1642854>, @peter.smith wrote:

> I think I know what is causing the kernel to fault the ELF file
>
> I think that this misalignment might be caused because p_filesz is 0, which might skip the alignment of the p_offset (not checked).
>
> @MaskRay are you ok to take it from here?


Thanks a lot for narrowing down the issue! I saw a similar issue while playing with lld ppc32. (ppc32 BSS PLT is a nobits RWX section, included in a separate PT_LOAD. Our current computeFileOffset can cause `p_vaddr%p_align!=p_offset%p_align`) I will work on a patch.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D64930





More information about the llvm-commits mailing list