xref: /llvm-project/llvm/test/LTO/Resolution/X86/setting-dso-local.ll (revision 15655915b38600c28f58721950ae75e6284763b6)
1; RUN: llvm-as -o %t.o %s
2; RUN: llvm-lto2 run -o %t2.o %t.o -r=%t.o,_start,plx -r=%t.o,foobar,x
3; RUN: llvm-readelf --symbols %t2.o.0 | FileCheck %s
4
5; We used to fail the verifier by clearing dso_local from foobar
6
7; CHECK:  0000000000000000     0 NOTYPE  GLOBAL HIDDEN   UND foobar
8
9target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
10target triple = "x86_64-unknown-linux-gnu"
11
12@foobar = external hidden global i32
13define ptr @_start() {
14  ret ptr @foobar
15}
16