[lld] [llvm] [lld][AArch64][Build Attributes] Add support for AArch64 Build Attributes (PR #142637)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 06:20:37 PDT 2025


================
@@ -539,6 +540,42 @@ uint32_t ObjFile<ELFT>::getSectionIndex(const Elf_Sym &sym) const {
       this);
 }
 
+template <class ELFT>
+static void
+handleAArch64BAAndGnuProperties(ObjFile<ELFT> *file, Ctx &ctx, bool hasGP,
+                                const AArch64BuildAttrSubsections &baInfo,
+                                const GnuPropertiesInfo &gpInfo) {
+  if (hasGP) {
+    // Check for data mismatch
+    if (gpInfo.pauthAbiCoreInfo) {
+      if (baInfo.Pauth.TagPlatform != gpInfo.pauthAbiCoreInfo->platform)
+        Err(ctx)
+            << file
+            << " Pauth Data mismatch: file contains both GNU properties and "
+               "AArch64 build attributes sections with different Pauth data";
+    }
+    if (baInfo.AndFeatures != gpInfo.andFeatures)
+      Err(ctx) << file
+               << " Features Data mismatch: file contains both GNU "
+                  "properties and AArch64 build attributes sections with "
+                  "different And Features data";
+  } else {
+    // Write missing data
----------------
sivan-shani wrote:

Handled 

https://github.com/llvm/llvm-project/pull/142637


More information about the llvm-commits mailing list