20 lines · plain
1; RUN: llvm-as %s -o %t.o2; RUN: llvm-as %p/Inputs/weak.ll -o %t2.o3 4; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \5; RUN: --plugin-opt=emit-llvm \6; RUN: -shared %t.o %t2.o -o %t3.o7; RUN: llvm-dis %t3.o -o - | FileCheck %s8 9target triple = "x86_64-unknown-linux-gnu"10target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"11 12@a = weak global i32 4213@b = global ptr @a14 15; Test that @b and @c end up pointing to the same variable.16 17; CHECK: @b = global ptr @a{{$}}18; CHECK: @a = weak global i32 4219; CHECK: @c = global ptr @a{{$}}20