[PATCH] D84701: [LLD] [MinGW] Implement the --no-seh flag

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 13:52:08 PDT 2020


mstorsjo created this revision.
mstorsjo added reviewers: hans, amccarth, smeenai.
Herald added a subscriber: dang.
Herald added a project: LLVM.

Previously this flag was just ignored. If set, set the IMAGE_DLL_CHARACTERISTICS_NO_SEH bit, regardless of the normal safeSEH machinery.

In mingw configurations, the safeSEH bit might not be set in e.g. object files built from handwritten assembly, making it impossible to use the normal safeseh flag. As mingw setups don't generally use SEH on 32 bit x86 at all, it should be fine to set that flag bit though - hook up the existing GNU ld flag for controlling that.

@hans - This isn't a regression fix, but a fairly safe new option, that might be important for VLC (it might fix https://code.videolan.org/videolan/vlc-winrt/-/issues/303, issues in certifying VLC built with llvm-mingw, due to this flag missing).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84701

Files:
  lld/COFF/Config.h
  lld/COFF/Driver.cpp
  lld/COFF/Options.td
  lld/COFF/Writer.cpp
  lld/MinGW/Driver.cpp
  lld/MinGW/Options.td
  lld/test/COFF/noseh.s
  lld/test/MinGW/driver.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84701.281047.patch
Type: text/x-patch
Size: 4686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200727/56b6871a/attachment.bin>


More information about the llvm-commits mailing list