[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

Szabolcs Nagy via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 08:49:48 PDT 2020


nsz added a comment.

the gcc behaviour is not exactly ideal, but it's better if llvm is compatible with it or fix gcc if something is broken there.

the assumption is that the intended branch protection is implied via cmdline flags for the tu and function attributes are only used in source code for some hack. a common reason for such hack is to disable bti somewhere but still keep the bti elf marking. (if the intention was to mark the code non-bti compatible then just dont compile it with bti, using a non-portable  bti specfic function attribute would not work well for such use anyway)

now this may not work well with lto when functions can come from different places and the function attributes encode how those were compiled. so hopefully there is something that preserves the flags of the translation units and explicitly specified function attributes can be treated separately (such that they dont affect elf markings).


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

https://reviews.llvm.org/D80791



More information about the cfe-commits mailing list