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

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 15:31:27 PDT 2020


amccarth added a comment.

This is probably fine, be I have an inline comment with some questions.



================
Comment at: lld/COFF/Writer.cpp:1396
     pe->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY;
-  if (setNoSEHCharacteristic)
+  if (setNoSEHCharacteristic || config->noSEH)
     pe->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_NO_SEH;
----------------
Should `setNoSEHCharacteristic` and `config->noSEH` always agree?  What happens when they don't?

`setNoSEHCharacteristic` is set in `Writer::createSEHTable` when there are no SEH handlers.  Should this logical-OR happen there?

What happens if the user chooses `--noSEH` but there are SEH handlers?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84701/new/

https://reviews.llvm.org/D84701





More information about the llvm-commits mailing list