hanchenye-llvm-project/lld/COFF
Reid Kleckner fe44a531e0 [COFF] Implement /safeseh:no and check @feat.00 flags by default
Summary:
Fixes PR41828. Before this, LLD always emitted SafeSEH chunks and
defined __safe_se_handler_table & size. Now, /safeseh:no leaves those
undefined.

Additionally, we were checking for the safeseh @feat.00 flag in two
places: once to emit errors, and once during safeseh table construction.
The error was set up to be off by default, but safeseh is supposed to be
on by default. I combined the two checks, so now LLD emits an error if
an input object lacks @feat.00 and safeseh is enabled. This caused the
majority of 32-bit LLD tests to fail, since many test input object files
lack @feat.00 symbols. I explicitly added -safeseh:no to those tests to
preserve behavior.

Finally, LLD no longer sets IMAGE_DLL_CHARACTERISTICS_NO_SEH if any
input file wasn't compiled for safeseh.

Reviewers: mstorsjo, ruiu, thakis

Reviewed By: ruiu, thakis

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63570

llvm-svn: 366238
2019-07-16 18:17:33 +00:00
..
CMakeLists.txt [LLD][COFF] Early dependency detection 2019-04-01 13:36:59 +00:00
Chunks.cpp [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
Chunks.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Config.h [COFF] Implement /safeseh:no and check @feat.00 flags by default 2019-07-16 18:17:33 +00:00
DLL.cpp [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
DLL.h [COFF] Share the tail in delayimport symbol thunks 2019-07-11 21:19:11 +00:00
DebugTypes.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
DebugTypes.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Driver.cpp [COFF] Implement /safeseh:no and check @feat.00 flags by default 2019-07-16 18:17:33 +00:00
Driver.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
DriverUtils.cpp [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
ICF.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
ICF.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
InputFiles.cpp [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
InputFiles.h [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
LTO.cpp [lld-link] implement -thinlto-{prefix,object-suffix}-replace 2019-07-11 18:48:58 +00:00
LTO.h [lld-link] implement -thinlto-index-only 2019-07-11 18:03:14 +00:00
MapFile.cpp Update comments for r365730. NFC. 2019-07-11 06:08:54 +00:00
MapFile.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MarkLive.cpp Fix odd variable names. 2019-07-12 06:12:27 +00:00
MarkLive.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MinGW.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MinGW.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Options.td [lld-link] implement -thinlto-{prefix,object-suffix}-replace 2019-07-11 18:48:58 +00:00
PDB.cpp [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
PDB.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
README.md
SymbolTable.cpp [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
SymbolTable.h [COFF] Rename variale references in comments after VariableName -> variableName change 2019-07-16 08:26:38 +00:00
Symbols.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Symbols.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
TypeMerger.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Writer.cpp [COFF] Implement /safeseh:no and check @feat.00 flags by default 2019-07-16 18:17:33 +00:00
Writer.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00

README.md

See docs/NewLLD.rst