[PATCH] D95199: [ELF] Write output sections in PT_LOAD segment order
Patrick Oppenlander via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 21:36:37 PST 2021
pattop added a comment.
In D95199#2514547 <https://reviews.llvm.org/D95199#2514547>, @MaskRay wrote:
> For `out-of-order-sections.s`, you could just swap foo and bar.
Yes, this is true. I crafted the test case specifically to highlight the problem.
> The few updated tests seem to have undesired sh_offset changes.
I examined these and to the best of my (limited) understanding the resultant offset changes looked ok, however, I may have missed something important.
> GNU ld's placement rules are much more complex. We implement sufficient parts to be compatible with a wide range of linker scripts and may require updating the linker scripts in some cases.
My desire to have this case work comes from a real world embedded project. In conjunction with https://reviews.llvm.org/D95198 it makes lld far more usable in this context.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95199/new/
https://reviews.llvm.org/D95199
More information about the llvm-commits
mailing list