2 # Verify that the lld can link to GNU import libs.
4 # RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-head.s -filetype=obj -o %t-dabcdh.o
5 # RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-func.s -filetype=obj -o %t-dabcds00000.o
6 # RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-tail.s -filetype=obj -o %t-dabcdt.o
7 # RUN: rm -f %t-implib.a
8 # RUN: llvm-ar rcs %t-implib.a %t-dabcdh.o %t-dabcds00000.o %t-dabcdt.o
9 # Not linking with -lldmingw; one can link to GNU import libs even if not targeting MinGW.
10 # RUN: lld-link -out:%t.exe -entry:main -subsystem:console \
11 # RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib %t-implib.a -include:func
12 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
14 # Check that import entries from both libraries show up.
17 IMPORT-NEXT: Name: foo.dll
18 IMPORT-NEXT: ImportLookupTableRVA:
19 IMPORT-NEXT: ImportAddressTableRVA:
20 IMPORT-NEXT: Symbol: func (0)
23 IMPORT-NEXT: Name: std64.dll
24 IMPORT-NEXT: ImportLookupTableRVA:
25 IMPORT-NEXT: ImportAddressTableRVA:
26 IMPORT-NEXT: Symbol: ExitProcess (0)
27 IMPORT-NEXT: Symbol: (50)
28 IMPORT-NEXT: Symbol: MessageBoxA (1)