2013-06-18 02:43:13 +08:00
|
|
|
# Verify that lld can handle .lib files. "main.obj" refers _val1 and
|
2013-07-11 16:46:21 +08:00
|
|
|
# _val2 that are defined in "vars.lib".
|
2013-06-18 02:43:13 +08:00
|
|
|
#
|
2013-07-11 16:46:21 +08:00
|
|
|
# RUN: yaml2obj %p/Inputs/vars-main.obj.yaml > %t.obj
|
2013-07-05 18:41:44 +08:00
|
|
|
#
|
|
|
|
# RUN: lld -flavor link -out %t1 -subsystem console -- %t.obj \
|
2013-07-11 16:46:21 +08:00
|
|
|
# RUN: %p/Inputs/vars.lib && llvm-objdump -d %t1 | FileCheck %s
|
2013-07-19 10:18:25 +08:00
|
|
|
#
|
|
|
|
# RUN: lld -flavor link -out %t1 -subsystem console -libpath %p/Inputs \
|
|
|
|
# RUN: -- %t.obj vars.lib && llvm-objdump -d %t1 | FileCheck %s
|
2013-07-19 11:27:03 +08:00
|
|
|
#
|
|
|
|
# RUN: LIB=%p/Inputs lld -flavor link -out %t1 -subsystem console \
|
|
|
|
# RUN: -- %t.obj vars.lib && llvm-objdump -d %t1 | FileCheck %s
|
2013-06-18 02:43:13 +08:00
|
|
|
|
|
|
|
CHECK: Disassembly of section .text:
|
|
|
|
CHECK: .text:
|
2013-07-11 16:46:21 +08:00
|
|
|
CHECK: 1000: 55 pushl %ebp
|
|
|
|
CHECK: 1001: 8b ec movl %esp, %ebp
|
|
|
|
CHECK: 1003: ff 15 4c 20 40 00 calll *4202572
|
|
|
|
CHECK: 1009: 8b 0d 50 20 40 00 movl 4202576, %ecx
|
|
|
|
CHECK: 100f: 03 01 addl (%ecx), %eax
|
|
|
|
CHECK: 1011: 5d popl %ebp
|
|
|
|
CHECK: 1012: c3 ret
|