[lld] r330868 - [COFF] Don't set the tsaware bit on DLLs
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 25 13:32:00 PDT 2018
Author: hans
Date: Wed Apr 25 13:32:00 2018
New Revision: 330868
URL: http://llvm.org/viewvc/llvm-project?rev=330868&view=rev
Log:
[COFF] Don't set the tsaware bit on DLLs
It doesn't apply to DLLs, and link.exe doesn't set it.
Differential Revision: https://reviews.llvm.org/D46077
Modified:
lld/trunk/COFF/Driver.cpp
lld/trunk/test/COFF/options.test
Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=330868&r1=330867&r2=330868&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Wed Apr 25 13:32:00 2018
@@ -1165,7 +1165,8 @@ void LinkerDriver::link(ArrayRef<const c
!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);
Modified: lld/trunk/test/COFF/options.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/options.test?rev=330868&r1=330867&r2=330868&view=diff
==============================================================================
--- lld/trunk/test/COFF/options.test (original)
+++ lld/trunk/test/COFF/options.test Wed Apr 25 13:32:00 2018
@@ -48,4 +48,8 @@ TSAWARE: IMAGE_DLL_CHARACTERISTICS_TERMI
# 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
More information about the llvm-commits
mailing list