xref: /llvm-project/llvm/test/MC/RISCV/mapping-within-section.s (revision a0d8a53c7d0e6ca1c94b5d5c4a65790dd5705ef8)
1# RUN: llvm-mc -triple=riscv32 -filetype=obj %s | llvm-readelf -Ss - | FileCheck %s
2# RUN: llvm-mc -triple=riscv64 -filetype=obj %s | llvm-readelf -Ss - | FileCheck %s
3
4        .text
5# $x at 0x0000
6        nop
7# $d at 0x0004
8        .ascii "012"
9        .byte 1
10        .hword 2
11        .word 4
12        .single 4.0
13        .double 8.0
14        .space 10
15        .zero 3
16        .fill 10, 2, 42
17        .org 100, 12
18# $x at 0x0064
19        nop
20
21## Capture section index.
22# CHECK: [[#TEXT:]]] .text
23
24# CHECK:    Value  Size Type    Bind   Vis     Ndx       Name
25# CHECK: 00000000     0 NOTYPE  LOCAL  DEFAULT [[#TEXT]] $x
26# CHECK: 00000004     0 NOTYPE  LOCAL  DEFAULT [[#TEXT]] $d
27# CHECK: 00000064     0 NOTYPE  LOCAL  DEFAULT [[#TEXT]] $x
28