[lld] [LLD] Add CLASS syntax to SECTIONS (PR #95323)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 13:31:31 PDT 2024


================
@@ -0,0 +1,432 @@
+# REQUIRES: x86
+
+# RUN: rm -rf %t && split-file %s %t && cd %t
+
+#--- matching.s
+.section .rodata.a,"a", at progbits
+.byte 1
+
+.section .rodata.b,"a", at progbits
+.byte 2
+
+.section .rodata.c,"ax", at progbits
+.byte 3
+
+.section .rodata.d,"a", at progbits
+.byte 4
+
+.section .rodata.e,"a", at progbits
+.byte 5
+
+.section .rodata.f,"a", at progbits
+.balign 2
+.byte 6
+
+.section .rodata.g,"a", at progbits
+.byte 7
+
+.section .rodata.h,"a", at progbits
+.byte 8
+
+# RUN: llvm-mc -n -filetype=obj -triple=x86_64 matching.s -o matching.o
+
+#--- matching.lds
+## CLASS definitions match sections in linker script order. The sections may be
+## placed in a different order. Classes may derive from one another. Class # #
----------------
MaskRay wrote:

trailing `# #`

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


More information about the llvm-commits mailing list