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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 11 17:03:26 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);
+}
----------------
hfinkel wrote:
> 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?
If you don't need that for PPC now, you can leave .got as is.


http://reviews.llvm.org/D13621





More information about the llvm-commits mailing list