[PATCH] D46077: [COFF] Don't set the tsaware bit on DLLs
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 25 12:55:27 PDT 2018
hans created this revision.
hans added reviewers: ruiu, thakis.
It doesn't apply to DLLs, and link.exe doesn't set it.
https://reviews.llvm.org/D46077
Files:
COFF/Driver.cpp
test/COFF/options.test
Index: test/COFF/options.test
===================================================================
--- test/COFF/options.test
+++ test/COFF/options.test
@@ -48,4 +48,8 @@
# RUN: lld-link /tsaware:no /out:%t.exe /entry:main %t.obj
# RUN: llvm-readobj -file-headers %t.exe | FileCheck -check-prefix=NOTSAWARE %s
+# RUN: lld-link /dll /out:%t.dll /entry:main %t.obj
+# RUN: llvm-readobj -file-headers %t.dll | FileCheck -check-prefix=NOTSAWARE %s
+# RUN: lld-link /tsaware /dll /out:%t.dll /entry:main %t.obj
+# RUN: llvm-readobj -file-headers %t.dll | FileCheck -check-prefix=NOTSAWARE %s
NOTSAWARE-NOT: IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE
Index: COFF/Driver.cpp
===================================================================
--- COFF/Driver.cpp
+++ COFF/Driver.cpp
@@ -1165,7 +1165,8 @@
!Config->DoGC && !Config->DoICF && !Args.hasArg(OPT_order) &&
!Args.hasArg(OPT_profile));
Config->NxCompat = Args.hasFlag(OPT_nxcompat, OPT_nxcompat_no, true);
- Config->TerminalServerAware = Args.hasFlag(OPT_tsaware, OPT_tsaware_no, true);
+ Config->TerminalServerAware =
+ !Config->DLL && Args.hasFlag(OPT_tsaware, OPT_tsaware_no, true);
Config->DebugDwarf = Args.hasArg(OPT_debug_dwarf);
Config->DebugGHashes = Args.hasArg(OPT_debug_ghash);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46077.143991.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180425/263c5f57/attachment.bin>
More information about the llvm-commits
mailing list