3 ; RUN: rm -rf %t && split-file %s %t && cd %t
4 ; RUN: llvm-mc -filetype=obj -triple=riscv32 1.s -o 1.o
5 ; RUN: llvm-mc -filetype=obj -triple=riscv32 2.s -o 2.o
6 ; RUN: llvm-as a.ll -o a.bc
7 ; RUN: ld.lld 1.o 2.o a.bc -o out
8 ; RUN: llvm-readelf --arch-specific out | FileCheck %s
10 ; CHECK: BuildAttributes {
11 ; CHECK-NEXT: FormatVersion: 0x41
12 ; CHECK-NEXT: Section 1 {
13 ; CHECK-NEXT: SectionLength: 98
14 ; CHECK-NEXT: Vendor: riscv
15 ; CHECK-NEXT: Tag: Tag_File (0x1)
16 ; CHECK-NEXT: Size: 88
17 ; CHECK-NEXT: FileAttributes {
18 ; CHECK-NEXT: Attribute {
20 ; CHECK-NEXT: Value: 16
21 ; CHECK-NEXT: TagName: stack_align
22 ; CHECK-NEXT: Description: Stack alignment is 16-bytes
24 ; CHECK-NEXT: Attribute {
26 ; CHECK-NEXT: Value: 1
27 ; CHECK-NEXT: TagName: unaligned_access
28 ; CHECK-NEXT: Description: Unaligned access
30 ; CHECK-NEXT: Attribute {
32 ; CHECK-NEXT: TagName: arch
33 ; CHECK-NEXT: Value: rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zicsr2p0_zmmul1p0_zaamo1p0_zalrsc1p0_zbb1p0{{$}}
41 .attribute 5, "rv32i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_zmmul1p0"
44 .attribute 5, "rv32i2p1_m2p0_f2p2_d2p2_zbb1p0_zmmul1p0"
48 target datalayout = "e-m:e-p:32:32-i64:64-n32-S128"
49 target triple = "riscv32"
51 define void @_start() {