[PATCH] D23140: Split InputSectionDescription::Sort into SortInner and SortOuter.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 4 02:11:59 PDT 2016
grimar accepted this revision.
grimar added a comment.
This revision is now accepted and ready to land.
I like it, LGTM. Comments below.
================
Comment at: ELF/LinkerScript.cpp:142
@@ +141,3 @@
+ InputSectionBase<ELFT> *B) {
+ return A->Alignment < B->Alignment;
+}
----------------
I found a bug, SORT_BY_ALIGNMENT should sort sections into descending order.
Committed fix as r277706.
So condition should be ">" here.
================
Comment at: ELF/LinkerScript.cpp:752
@@ -756,1 +751,3 @@
+ if (SortKind K2 = readSortKind()) {
+ Cmd->SortInner = K2;
expect("(");
----------------
May be something like:
if (K1 != K2)
Cmd->SortInner = K2;
to avoid double sorting when the same rule is specified twice:
SORT_BY_NAME (SORT_BY_NAME(...))
https://reviews.llvm.org/D23140
More information about the llvm-commits
mailing list