[PATCH] D95198: [ELF] Fix program header alloc when first PT_LOAD is not at lowest VMA

Patrick Oppenlander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 17:01:37 PST 2021


pattop added a comment.

I agree that the description could be better. Looks like I fixated on the "could not allocate headers" error message when I wrote it.

I think --nmagic is unrelated. In the included test case lld is unable to allocate headers because there is a MEMORY (mem2) located at address 0. The current logic finds the lowest VMA in the program (in this case 0) and tries place the headers in front of that address. Turning off page alignment won't help.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95198



More information about the llvm-commits mailing list