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

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 10:44:57 PDT 2018


peter.smith added a comment.

I think that setting SHF_ARM_PURECODE for the initial .text section is the right thing to do; the flag is a declaration that the section does not read from the .text section, and that property is satisfied by an empty section. For reference the code you've restored was removed in https://reviews.llvm.org/rL306927 "Rewrite ARM execute only support to avoid the use of a command line flag and unqualified ARMSubtarget lookup." I think the unqualified ARMSubtarget lookup might need a bit more exploration; for example what happens if this is the link step of a LTO build where the functions have ARMSubtargets with SHF_ARM_PURECODE but the command line to the link step has no code generation flags I think that the ARMSubtarget is likely to not have the ARM::FeatureExecuteOnly. If this is the case then we may need an alternative approach. At a glance would it be possible to always add SHF_ARM_PURECODE to the initial .text section?


Repository:
  rL LLVM

https://reviews.llvm.org/D48792





More information about the llvm-commits mailing list