[PATCH] D22749: [ELF] - Linkerscript: Implemented SORT command

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 04:20:56 PDT 2016


evgeny777 added inline comments.

================
Comment at: ELF/LinkerScript.cpp:137
@@ +136,3 @@
+            [](InputSectionBase<ELFT> *A, InputSectionBase<ELFT> *B) {
+        return A->getSectionName() < B->getSectionName();
+      });
----------------
What about SORT(*(.data))? How will .data sections be ordered?



================
Comment at: ELF/LinkerScript.cpp:664
@@ +663,3 @@
+                                               bool Keep) {
+  if (peek() == "SORT") {
+    expect("SORT");
----------------
I would check for "SORT" in readOutputSectionDescription.


https://reviews.llvm.org/D22749





More information about the llvm-commits mailing list