3 ; RUN: echo -e ".global variable\n.global DllMainCRTStartup\n.text\nDllMainCRTStartup:\nret\n.data\nvariable:\n.long 42" > %t-lib.s
4 ; RUN: llvm-mc -triple=x86_64-windows-gnu %t-lib.s -filetype=obj -o %t-lib.obj
5 ; RUN: lld-link -out:%t-lib.dll -dll -entry:DllMainCRTStartup %t-lib.obj -lldmingw -implib:%t-lib.lib
7 ; RUN: llvm-as -o %t.obj %s
8 ; RUN: lld-link -lldmingw -out:%t.exe -entry:entry %t.obj %t-lib.lib
10 ; RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
13 ; IMPORTS-NEXT: Name: autoimport-lto.ll.tmp-lib.dll
14 ; IMPORTS-NEXT: ImportLookupTableRVA:
15 ; IMPORTS-NEXT: ImportAddressTableRVA:
16 ; IMPORTS-NEXT: Symbol: variable (0)
19 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
20 target triple = "x86_64-w64-windows-gnu"
22 @variable = external global i32
26 %0 = load i32, ptr @variable