[PATCH] D13621: [ELF2] Sort PPC64 special sections

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 16:51:34 PDT 2015


ruiu added inline comments.

================
Comment at: ELF/Writer.cpp:311-317
@@ +310,9 @@
+static int getPPC64SectionRank(StringRef SectionName) {
+  return StringSwitch<int>(SectionName)
+           .Case(".tocbss",    0)
+           .Case(".branch_lt", 2)
+           .Case(".toc",       3)
+           .Case(".toc1",      4)
+           .Case(".opd",       5)
+           .Default(1);
+}
----------------
Sorry, I meant

  0 .tocbss
  1 any other name
  2 .got (* was a typo)
  3 .branch_lt
  4 .toc
  5 .toc1
  6 .opd

This is my interpretation of your code. I'm not 100% sure that this ranking is correct, though. So please verify.

Also please remove excessive spaces at .Case("...", <*here*><number>)


http://reviews.llvm.org/D13621





More information about the llvm-commits mailing list