brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 2f308b8 Raw
30 lines · plain
1# REQUIRES: x862# Verify that the lld can link to GNU import libs.3#4# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-head.s -filetype=obj -o %t-dabcdh.o5# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-func.s -filetype=obj -o %t-dabcds00000.o6# RUN: llvm-mc -triple=x86_64-windows-gnu %p/Inputs/gnu-implib-tail.s -filetype=obj -o %t-dabcdt.o7# RUN: rm -f %t-implib.a8# RUN: llvm-ar rcs %t-implib.a %t-dabcdh.o %t-dabcds00000.o %t-dabcdt.o9# 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:func12# RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s13 14# Check that import entries from both libraries show up.15 16IMPORT:      Import {17IMPORT-NEXT:   Name: foo.dll18IMPORT-NEXT:   ImportLookupTableRVA:19IMPORT-NEXT:   ImportAddressTableRVA:20IMPORT-NEXT:   Symbol: func (0)21IMPORT-NEXT: }22IMPORT-NEXT: Import {23IMPORT-NEXT:   Name: std64.dll24IMPORT-NEXT:   ImportLookupTableRVA:25IMPORT-NEXT:   ImportAddressTableRVA:26IMPORT-NEXT:   Symbol: ExitProcess (0)27IMPORT-NEXT:   Symbol:  (50)28IMPORT-NEXT:   Symbol: MessageBoxA (1)29IMPORT-NEXT: }30