HomePhabricator

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

Authored by danielkiss on Mon, Sep 28, 4:57 AM.

Description

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

Flags of the module derived exclusively from the compiler flag -mbranch-protection.
The note is generated based on the module flags accordingly.
After this change in case of compile unit without function won't have
the .note.gnu.property if the compiler flag is not present [1].

[1] https://bugs.llvm.org/show_bug.cgi?id=46480

Reviewed By: chill

Differential Revision: https://reviews.llvm.org/D80791