[PATCH] D77971: [MC][X86][NFC] Disable branch align in non-text section

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 22:01:22 PDT 2020


skan added a comment.

In D77971#1985752 <https://reviews.llvm.org/D77971#1985752>, @MaskRay wrote:

> In D77971#1985717 <https://reviews.llvm.org/D77971#1985717>, @skan wrote:
>
> > In D77971#1981345 <https://reviews.llvm.org/D77971#1981345>, @MaskRay wrote:
> >
> > > If we consider instructions in non-SHF_EXECINSTR sections an undefined behavior.
> >
> >
> > I asked some experts about this, and got the answer that putting instructions in non-executable section is legal and their encoding values will be treated as data. Do you have other concern about this patch?
>
>
> Can you add some information to the description? Ideally there should be an example that instructions in a non-executable section are useful.
>
> Personally I like this resolution because that means we don't need to extend D78138 <https://reviews.llvm.org/D78138> (bss like sections) to non-executable sections.


I added some information about why we need this check in the summary. It's difficult for me to give some useful examples, but I know putting instructions in non-executable sections are semantically correct.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77971/new/

https://reviews.llvm.org/D77971





More information about the llvm-commits mailing list