2 ; RUN: llvm-as %s -o %t.o
3 ; RUN: ld.lld %t.o -o %t.so -shared
4 ; RUN: llvm-readobj --sections %t.so | FileCheck %s
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
7 target triple = "x86_64-unknown-linux-gnu"
9 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @ctor, ptr null }]
11 call void asm "nop", ""()
15 ; The llvm.global_ctors should end up producing constructors.
16 ; On x86-64 (linux) we should always emit .init_array and never .ctors.
17 ; CHECK: Name: .init_array
18 ; CHECK-NOT: Name: .ctors