19 lines · plain
1; REQUIRES: x862; RUN: llvm-as %s -o %t.o3; RUN: ld.lld %t.o -o %t.so -shared4; RUN: llvm-readobj --sections %t.so | FileCheck %s5 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, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @ctor, ptr null }]10define void @ctor() {11 call void asm "nop", ""()12 ret void13}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_array18; CHECK-NOT: Name: .ctors19