[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.
Szabolcs Nagy via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 05:00:18 PDT 2020
nsz added a comment.
In D80791#2207203 <https://reviews.llvm.org/D80791#2207203>, @chill wrote:
> I would prefer to avoid the situation where the markings of two otherwise identical files were different,
> depending on how the files were produced, no matter if it was a common or a special case.
i don't see why it is desirable to silently get marking on an object file if function definitions happen to be bti compatible in it:
- compiler cannot reliably do this (e.g. bti incompatible inline asm).
- some users don't want the marking: not all linkers support it so it can cause unexpected breakage.
- most users (all?) want the marking reliably (not opportunistically), but function annotations are fragile (can depend on optimizations and code outside of user control).
- it is not useful to have a bti annotated function unless everything else is bti compatible too: it is all or nothing per elf module.
- but a compiler cannot diagnose if only some functions have the annotation (we don't have a cflag for it) so even if the compiler tried to add the marking silently users cannot rely on it: it's too easy to drop the marking and no way to debug such failure.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80791/new/
https://reviews.llvm.org/D80791
More information about the cfe-commits
mailing list