1# REQUIRES: riscv 2 3# RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.o 4# RUN: ld.lld %t.o -o %t 5# RUN: llvm-readelf --arch-specific %t | FileCheck %s 6# RUN: ld.lld %t.o %t.o -o %t2 7# RUN: llvm-readelf --arch-specific %t2 | FileCheck %s 8 9# CHECK: BuildAttributes { 10# CHECK-NEXT: FormatVersion: 0x41 11# CHECK-NEXT: Section 1 { 12# CHECK-NEXT: SectionLength: 52 13# CHECK-NEXT: Vendor: riscv 14# CHECK-NEXT: Tag: Tag_File (0x1) 15# CHECK-NEXT: Size: 42 16# CHECK-NEXT: FileAttributes { 17# CHECK-NEXT: Attribute { 18# CHECK-NEXT: Tag: 4 19# CHECK-NEXT: Value: 16 20# CHECK-NEXT: TagName: stack_align 21# CHECK-NEXT: Description: Stack alignment is 16-bytes 22# CHECK-NEXT: } 23# CHECK-NEXT: Attribute { 24# CHECK-NEXT: Tag: 5 25# CHECK-NEXT: TagName: arch 26# CHECK-NEXT: Value: rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0 27# CHECK-NEXT: } 28# CHECK-NEXT: } 29# CHECK-NEXT: } 30# CHECK-NEXT: } 31 32.attribute 4, 16 33.attribute 5, "rv64i2p0_m2p0_a2p0_f2p0_d2p0_c2p0" 34