[PATCH] D32399: [LLD] Order writable executable sections before writable ones

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 13:49:00 PDT 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lld/ELF/Writer.cpp:637
+  RF_NOT_ALLOC = 1 << 14,
+  RF_WRITE = 1 << 13,
+  RF_EXEC_WRITE = 1 << 12,
----------------
nit: RF_WRITE_EXEC is probably more natural order, as in rwx.



================
Comment at: lld/ELF/Writer.cpp:681
+  // * Writable, executable sections follow such that .plt on
+  //   architectures where it needs to be writable will be placed
+  //   between .text and .data.
----------------
Add "(such as SPARC)" after "writable"


================
Comment at: lld/ELF/Writer.cpp:693-694
       Rank |= RF_EXEC;
+  } else {
+    if (IsWrite)
+      Rank |= RF_WRITE;
----------------
`} else if {`


https://reviews.llvm.org/D32399





More information about the llvm-commits mailing list