[PATCH] [ELF] Allow TargetLayout descendants to control assignment sections to segments

Rui Ueyama ruiu at google.com
Tue Apr 21 10:35:40 PDT 2015


LGTM


REPOSITORY
  rL LLVM

================
Comment at: lib/ReaderWriter/ELF/Mips/MipsTargetLayout.h:87
@@ +86,3 @@
+  uint64_t getLookupSectionFlags(const OutputSection<ELFT> *os) const override {
+    uint64_t flags = TargetLayout<ELFT>::getLookupSectionFlags(os);
+    return flags & ~llvm::ELF::SHF_MIPS_NOSTRIP;
----------------
I guess you can remove <ELFT> from this line.

================
Comment at: lib/ReaderWriter/ELF/TargetLayout.cpp:334
@@ +333,3 @@
+  uint64_t flags = os->flags();
+  if ((!(flags & llvm::ELF::SHF_WRITE)) && (_ctx.mergeRODataToTextSegment()))
+    flags &= ~llvm::ELF::SHF_EXECINSTR;
----------------
nit: remove () around the _ctx.mergeRODataToTextSegment(). Also remove outermost () (the entire if condition is doubly parenthesized).

================
Comment at: lib/ReaderWriter/ELF/TargetLayout.cpp:342
@@ +341,3 @@
+  flags &= ~(llvm::ELF::SHF_TLS);
+
+  return flags;
----------------
Remove this blank line.

http://reviews.llvm.org/D9160

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list