xref: /llvm-project/lld/test/ELF/riscv-attributes-place.s (revision 179a24c2f149933868e2a69b94200d7f4dcf18c5)
1# REQUIRES: riscv
2## The merged SHT_RISCV_ATTRIBUTES is placed at the first input
3## SHT_RISCV_ATTRIBUTES.
4
5# RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o
6# RUN: ld.lld -e 0 %t.o %t.o -o %t
7# RUN: llvm-readelf -S %t | FileCheck %s
8
9# CHECK:      Name              Type             Address          Off      Size   ES Flg Lk Inf Al
10# CHECK:      .riscv.a          PROGBITS         0000000000000000 [[#%x,]] 000002 00      0   0  1
11# CHECK-NEXT: .riscv.attributes RISCV_ATTRIBUTES 0000000000000000 [[#%x,]] 00001a 00      0   0  1
12# CHECK-NEXT: .riscv.b          PROGBITS         0000000000000000 [[#%x,]] 000002 00      0   0  1
13
14.section .riscv.a,""
15.byte 0
16
17.section .riscv.attributes,"",@0x70000003
18.byte 0x41
19.long .Lend-.riscv.attributes-1
20.asciz "riscv"  # vendor
21.Lbegin:
22.byte 1  # Tag_File
23.long .Lend-.Lbegin
24.byte 5  # Tag_RISCV_arch
25.asciz "rv64i2p0"
26.Lend:
27
28.section .riscv.b,""
29.byte 0
30