2 # Verify that the lld can handle .lib files and emit .idata sections.
4 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
5 # RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib
6 # RUN: llvm-objdump -d %t.exe | FileCheck --check-prefix=TEXT %s
7 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
9 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
10 # RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /include:ExitProcess
11 # RUN: llvm-objdump -d %t.exe | FileCheck --check-prefix=TEXT %s
12 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
14 TEXT: Disassembly of section .text:
17 TEXT-NEXT: subq $40, %rsp
18 TEXT-NEXT: movq $0, %rcx
19 TEXT-NEXT: leaq 8180(%rip), %rdx
20 TEXT-NEXT: leaq 8167(%rip), %r8
21 TEXT-NEXT: movl $0, %r9d
22 TEXT-NEXT: callq 0x140001060
23 TEXT-NEXT: movl $0, %ecx
24 TEXT-NEXT: callq 0x140001040
25 TEXT-NEXT: callq 0x140001050
26 TEXT: jmpq *4098(%rip)
27 TEXT: jmpq *4090(%rip)
28 TEXT: jmpq *4082(%rip)
31 IMPORT-NEXT: Name: std64.dll
32 IMPORT-NEXT: ImportLookupTableRVA: 0x2028
33 IMPORT-NEXT: ImportAddressTableRVA: 0x2048
34 IMPORT-NEXT: Symbol: ExitProcess (0)
35 IMPORT-NEXT: Symbol: (50)
36 IMPORT-NEXT: Symbol: MessageBoxA (1)
39 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console /merge:.rdata=.text \
40 # RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /include:ExitProcess
41 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=MERGE %s
44 MERGE-NEXT: Name: std64.dll
45 MERGE-NEXT: ImportLookupTableRVA: 0x1090
46 MERGE-NEXT: ImportAddressTableRVA: 0x10B0
47 MERGE-NEXT: Symbol: ExitProcess (0)
48 MERGE-NEXT: Symbol: (50)
49 MERGE-NEXT: Symbol: MessageBoxA (1)