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

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 16:59:18 PDT 2015


hfinkel 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);
+}
----------------
ruiu wrote:
> 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>)
I know, but if I do that, then I'll change the order of .got relative to other like sections for all targets. Is that okay?


http://reviews.llvm.org/D13621





More information about the llvm-commits mailing list