1; REQUIRES: x86 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 5 6target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 7target triple = "x86_64-unknown-linux-gnu" 8 9@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }] 10define void @ctor() { 11 call void asm "nop", ""() 12 ret void 13} 14 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 19