[PATCH] D48792: [ARM] Set execute-only flags in .text.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 13:56:52 PDT 2018


eugenis added inline comments.


================
Comment at: lib/MC/ELFObjectWriter.cpp:1123
+      }
+    }
   }
----------------
My understanding of MC infrastructure is a bit fuzzy, but this looks like a strange fixup where in most cases (but not always) the section would have correct flags set up already.

Also, is hasInstructions() correct predicate? What if there are data fragments in .text?

Would it be possible (and would it solve the issue?) to track "contains non-instructions" property on any section in a target-independent way, and then set SHF_ARM_PURECODE later in ARM-specific code when we are ready to emit the binary? The way we would not need to access the target when an empty text section is created.



https://reviews.llvm.org/D48792





More information about the llvm-commits mailing list