1 ; RUN: llc -mtriple=riscv32-unknown-linux-gnu -verify-machineinstrs -o - %s \
2 ; RUN: | FileCheck --check-prefix=INITARRAY %s
3 ; RUN: llc -mtriple=riscv32-unknown-elf -verify-machineinstrs -o - %s \
4 ; RUN: | FileCheck --check-prefix=INITARRAY %s
5 ; RUN: llc -mtriple=riscv64-unknown-linux-gnu -verify-machineinstrs -o - %s \
6 ; RUN: | FileCheck --check-prefix=INITARRAY %s
7 ; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs -o - %s \
8 ; RUN: | FileCheck --check-prefix=INITARRAY %s
10 ; RUN: llc -mtriple=riscv32-unknown-linux-gnu -verify-machineinstrs -use-ctors -o - %s \
11 ; RUN: | FileCheck --check-prefix=CTOR %s
12 ; RUN: llc -mtriple=riscv32-unknown-elf -verify-machineinstrs -use-ctors -o - %s \
13 ; RUN: | FileCheck --check-prefix=CTOR %s
14 ; RUN: llc -mtriple=riscv64-unknown-linux-gnu -verify-machineinstrs -use-ctors -o - %s \
15 ; RUN: | FileCheck --check-prefix=CTOR %s
16 ; RUN: llc -mtriple=riscv64-unknown-elf -verify-machineinstrs -use-ctors -o - %s \
17 ; RUN: | FileCheck --check-prefix=CTOR %s
19 define internal void @_GLOBAL__I_a() section ".text.startup" {
23 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__I_a, ptr null }]
25 ;INITARRAY: section .init_array
26 ;INITARRAY-NOT: .section .ctors
28 ;CTOR: .section .ctors
29 ;CTOR-NOT: section .init_array