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

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 09:09:39 PDT 2025


================
@@ -1,26 +1,49 @@
 // REQUIRES: aarch64
-// RUN: llvm-mc -triple=aarch64 %s -filetype=obj -o %t.o
-// RUN: ld.lld %t.o --shared -o %t.so
-// RUN: llvm-readelf --sections %t.so | FileCheck %s
-// RUN: ld.lld %t.o -o %t
-// RUN: llvm-readelf --sections %t | FileCheck %s
-// RUN: ld.lld -r %t.o -o %t2.o
-// RUN: llvm-readelf --sections %t2.o | FileCheck %s
-
-/// File has a Build attributes section. This should not appear in
-/// ET_EXEC or ET_SHARED files as there is no requirement for it to
-/// do so. FIXME, the ld -r (relocatable link) should output a single
-/// merged build attributes section. When full support is added in
-/// ld.lld this test should be updated.
+// RUN: rm -rf %t && split-file %s %t && cd %t
 
+// RUN: llvm-mc -triple=aarch64 -filetype=obj %s -o %t1.o
+// RUN: llvm-mc -triple=aarch64 -filetype=obj merged-2.s -o %t2.o
+// RUN: llvm-mc -triple=aarch64 -filetype=obj merged-3.s -o %t3.o
+// RUN: ld.lld -r %t1.o %t2.o %t3.o -o %t.merged.o
+// RUN: llvm-readelf -n %t.merged.o | FileCheck %s --check-prefix=NOTE
+
----------------
sivan-shani wrote:

ack

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


More information about the llvm-commits mailing list