[lld] [LLD] Add CLASS syntax to SECTIONS (PR #95323)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 23:17:57 PDT 2024
================
@@ -0,0 +1,433 @@
+# REQUIRES: x86
+
+# RUN: rm -rf %t && split-file %s %t && cd %t
+
+# RUN: llvm-mc -n -filetype=obj -triple=x86_64 matching.s -o matching.o
+
+## CLASS definitions match sections in linker script order. The sections may be
+## placed in a different order. Classes may derive from one another, and class
+## references may be restricted by INPUT_SECTION_FLAGS.
+
+# RUN: ld.lld -T matching.ld matching.o -o matching
+# RUN: llvm-readobj -x .rodata -x .rodata.d matching | FileCheck %s --check-prefix=MATCHING
+
+# MATCHING: .rodata
+# MATCHING-NEXT: 020301cc 0605
+# MATCHING: .rodata.d
+# MATCHING-NEXT: 04
+
----------------
MaskRay wrote:
We don't use two blank lines as separators...
The usual style when there are many split-file parts is:
```
## xxx
# RUN: ld.lld ...
# CHECK: ...
```
https://github.com/llvm/llvm-project/pull/95323
More information about the llvm-commits
mailing list