[PATCH] D91249: [obj2yaml] - Sort sections by file offsets when dumping them.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 00:21:17 PST 2020
grimar added a comment.
In D91249#2389752 <https://reviews.llvm.org/D91249#2389752>, @MaskRay wrote:
> "actual order" -> "file offset header.
>
> What is the motivation behind this change?
There was a mini discussion about behavior of "LastSec"/"FirstSec" here:
https://reviews.llvm.org/D90458#inline-846536
In short - it is easier to assign sections to segments when they are sorted by file offsets.
Also, sorting will help to reduce the noise from D91152 <https://reviews.llvm.org/D91152> patch, which starts producing the "Offset" key
and misordered sections confuses the algorithm that calculates the expected offset basing on previous section.
I.e. having a rule that sections are sorted helps a bit for the following logic and helps to keep it simpler.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91249/new/
https://reviews.llvm.org/D91249
More information about the llvm-commits
mailing list