The comparator function to compare input sections as instructed by
SORT command was a bit too complicated because it needed to handle
four different cases. This patch split it into two function calls.
This patch also simplifies the parser.
Differential D23140
Split InputSectionDescription::Sort into SortInner and SortOuter. ClosedPublic Authored by ruiu on Aug 3 2016, 2:27 PM.
Details Summary The comparator function to compare input sections as instructed by This patch also simplifies the parser.
Diff Detail Event Timelinegrimar edited edge metadata. Comment ActionsI like it, LGTM. Comments below.
This revision is now accepted and ready to land.Aug 4 2016, 2:11 AM
Closed by commit rL277780: Split InputSectionDescription::Sort into SortInner and SortOuter. (authored by ruiu). · Explain WhyAug 4 2016, 3:34 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 66865 ELF/LinkerScript.h
ELF/LinkerScript.cpp
|
I found a bug, SORT_BY_ALIGNMENT should sort sections into descending order.
Committed fix as r277706.
So condition should be ">" here.