[PATCH] D63570: [COFF] Implement /safeseh:no and check @feat.00 flags by default
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 13:20:21 PDT 2019
rnk created this revision.
rnk added reviewers: mstorsjo, ruiu, thakis.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D63570
Files:
lld/COFF/Config.h
lld/COFF/Driver.cpp
lld/COFF/Writer.cpp
lld/test/COFF/allow-unknown-debug-info.test
lld/test/COFF/associative-comdat-mingw-i386.s
lld/test/COFF/constant.test
lld/test/COFF/def-export-stdcall.s
lld/test/COFF/delayimports32.test
lld/test/COFF/dllexport-mingw.s
lld/test/COFF/dllexport.s
lld/test/COFF/eh_frame_suffix_sorting.s
lld/test/COFF/entry-drectve.test
lld/test/COFF/entry-inference332.test
lld/test/COFF/exclude-all.s
lld/test/COFF/export-all.s
lld/test/COFF/export-stdcall.s
lld/test/COFF/export32.test
lld/test/COFF/fixed.test
lld/test/COFF/gfids-relocations32.s
lld/test/COFF/hello32.test
lld/test/COFF/largeaddressaware.test
lld/test/COFF/loadcfg32.test
lld/test/COFF/locally-imported32.test
lld/test/COFF/machine.test
lld/test/COFF/no-ipi-stream.test
lld/test/COFF/order-i386.test
lld/test/COFF/pdb-debug-f.s
lld/test/COFF/pdb-lib.s
lld/test/COFF/pdb-safeseh.yaml
lld/test/COFF/pdb-unknown-subsection.s
lld/test/COFF/reloc-x86.test
lld/test/COFF/safeseh-no.s
lld/test/COFF/subsystem-drectve.test
lld/test/COFF/subsystem-inference32.test
lld/test/COFF/tls32.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63570.205661.patch
Type: text/x-patch
Size: 31869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190619/22e6009f/attachment.bin>
More information about the llvm-commits
mailing list