2013-08-03 05:26:14 +08:00
|
|
|
# Test if the linker can properly parse the .drectve section contents.
|
2013-10-10 13:39:43 +08:00
|
|
|
# "drectve.obj" contains "/defaultlib:vars /subsystem:console,42.195 -?foo"
|
|
|
|
# in its .drectve section.
|
2013-08-03 05:26:14 +08:00
|
|
|
|
|
|
|
# RUN: yaml2obj %p/Inputs/drectve.obj.yaml > %t.obj
|
|
|
|
#
|
2013-10-10 13:39:43 +08:00
|
|
|
# RUN: lld -flavor link /out:%t.exe /entry:main /opt:noref /libpath:%p/Inputs \
|
|
|
|
# RUN: -- %t.obj >& %t.log
|
|
|
|
#
|
2013-09-04 08:51:51 +08:00
|
|
|
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=HEADER %s
|
2013-10-10 13:39:43 +08:00
|
|
|
# RUN: llvm-objdump -p %t.exe | FileCheck -check-prefix=IMPORT %s
|
2013-09-04 08:51:51 +08:00
|
|
|
# RUN: echo >> %t.log
|
|
|
|
# RUN: FileCheck -check-prefix=ERROR %s < %t.log
|
2013-08-03 05:26:14 +08:00
|
|
|
|
2013-09-04 08:51:51 +08:00
|
|
|
HEADER: MajorOperatingSystemVersion: 42
|
|
|
|
HEADER: MinorOperatingSystemVersion: 195
|
|
|
|
|
2013-10-10 13:39:43 +08:00
|
|
|
IMPORT: DLL Name: vars.dll
|
|
|
|
IMPORT-NEXT: Hint/Ord Name
|
|
|
|
IMPORT-NEXT: 0 _name_with_underscore
|
|
|
|
IMPORT-NEXT: 1 fn
|
|
|
|
IMPORT-NEXT: 1
|
|
|
|
|
2013-09-04 08:51:51 +08:00
|
|
|
ERROR-NOT: foo
|