[lld] [llvm] [lld][AArch64][Build Attributes] Add support for converting AArch64 Build Attributes to GNU Properties (PR #131990)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 01:44:01 PDT 2025
================
@@ -207,6 +209,51 @@ static void updateSupportedARMFeatures(Ctx &ctx,
ctx.arg.armHasThumb2ISA |= thumb && *thumb >= ARMBuildAttrs::AllowThumb32;
}
+struct AArch64BuildAttrSubsections {
+ struct PauthSubSection {
+ unsigned tagPlatform = 0;
+ unsigned tagSchema = 0;
+ } pauth;
+ struct FAndBSubSection {
+ unsigned tagBTI = 0;
+ unsigned tagPAC = 0;
+ unsigned tagGCS = 0;
+ } fAndB;
+};
+
+static AArch64BuildAttrSubsections
+extractBuildAttributesSubsections(const AArch64AttributeParser &attributes) {
+
+ AArch64BuildAttrSubsections subSections;
+ subSections.pauth.tagPlatform =
+ attributes
+ .getAttributeValue("aeabi_pauthabi",
+ llvm::AArch64BuildAttributes::TAG_PAUTH_PLATFORM)
+ .value_or(0);
+ subSections.pauth.tagSchema =
+ attributes
+ .getAttributeValue("aeabi_pauthabi",
+ llvm::AArch64BuildAttributes::TAG_PAUTH_SCHEMA)
+ .value_or(0);
+ subSections.fAndB.tagBTI =
+ attributes
+ .getAttributeValue("aeabi_feature_and_bits",
+ llvm::AArch64BuildAttributes::TAG_FEATURE_BTI)
+ .value_or(0);
+ subSections.fAndB.tagPAC =
----------------
sivan-shani wrote:
done
https://github.com/llvm/llvm-project/pull/131990
More information about the llvm-commits
mailing list