forked from OSchip/llvm-project
[PECOFF] Set default subsystem to the DLL header.
Subsystem field in the PE/COFF file header has no meanining for the DLL. It looks like MSVC link.exe sets the default subsystem (Windows GUI) to the field if no /subsystem option is specified. llvm-svn: 198015
This commit is contained in:
parent
782ad0eb71
commit
cc66ff6776
|
@ -41,6 +41,10 @@ public:
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (_ctx.getImageType() == PECOFFLinkingContext::IMAGE_DLL) {
|
||||
_ctx.setSubsystem(WindowsSubsystem::IMAGE_SUBSYSTEM_WINDOWS_GUI);
|
||||
return;
|
||||
}
|
||||
llvm_unreachable("Failed to infer the subsystem.");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# RUN: yaml2obj %p/Inputs/export.obj.yaml > %t.obj
|
||||
#
|
||||
# RUN: lld -flavor link /out:%t1.dll /dll /subsystem:console /entry:_init \
|
||||
# RUN: lld -flavor link /out:%t1.dll /dll /entry:_init \
|
||||
# RUN: /export:exportfn1 /export:exportfn2 -- %t.obj
|
||||
# RUN: llvm-objdump -s %t1.dll | FileCheck -check-prefix=CHECK1 %s
|
||||
|
||||
|
|
Loading…
Reference in New Issue