2017-07-19 02:40:50 +08:00
|
|
|
# REQUIRES: x86
|
2015-05-29 03:09:30 +08:00
|
|
|
# Verify that the lld can handle .lib files and emit .idata sections.
|
|
|
|
#
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
|
2015-05-31 11:55:46 +08:00
|
|
|
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib
|
2015-05-29 03:09:30 +08:00
|
|
|
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=TEXT %s
|
|
|
|
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
|
|
|
|
|
2015-08-07 00:47:46 +08:00
|
|
|
# RUN: lld-link /out:%t.exe /entry:main /subsystem:console \
|
2015-07-04 09:10:32 +08:00
|
|
|
# RUN: %p/Inputs/hello64.obj %p/Inputs/std64.lib /include:ExitProcess
|
|
|
|
# RUN: llvm-objdump -d %t.exe | FileCheck -check-prefix=TEXT %s
|
|
|
|
# RUN: llvm-readobj -coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
|
|
|
|
|
2015-05-29 03:09:30 +08:00
|
|
|
TEXT: Disassembly of section .text:
|
|
|
|
TEXT-NEXT: .text:
|
|
|
|
TEXT-NEXT: subq $40, %rsp
|
|
|
|
TEXT-NEXT: movq $0, %rcx
|
|
|
|
TEXT-NEXT: leaq -4108(%rip), %rdx
|
|
|
|
TEXT-NEXT: leaq -4121(%rip), %r8
|
|
|
|
TEXT-NEXT: movl $0, %r9d
|
2015-06-27 02:28:56 +08:00
|
|
|
TEXT-NEXT: callq 60
|
2015-05-29 03:09:30 +08:00
|
|
|
TEXT-NEXT: movl $0, %ecx
|
2015-06-27 02:28:56 +08:00
|
|
|
TEXT-NEXT: callq 18
|
|
|
|
TEXT-NEXT: callq 29
|
2017-06-03 02:49:38 +08:00
|
|
|
TEXT: jmpq *4098(%rip)
|
|
|
|
TEXT: jmpq *4090(%rip)
|
|
|
|
TEXT: jmpq *4082(%rip)
|
2015-05-29 03:09:30 +08:00
|
|
|
|
|
|
|
IMPORT: Import {
|
|
|
|
IMPORT-NEXT: Name: std64.dll
|
|
|
|
IMPORT-NEXT: ImportLookupTableRVA: 0x3028
|
2017-06-03 02:49:38 +08:00
|
|
|
IMPORT-NEXT: ImportAddressTableRVA: 0x3048
|
2015-05-29 03:09:30 +08:00
|
|
|
IMPORT-NEXT: Symbol: ExitProcess (0)
|
2015-06-02 05:05:27 +08:00
|
|
|
IMPORT-NEXT: Symbol: (50)
|
2015-05-29 23:45:35 +08:00
|
|
|
IMPORT-NEXT: Symbol: MessageBoxA (1)
|
2015-05-29 03:09:30 +08:00
|
|
|
IMPORT-NEXT: }
|