[PATCH] D41252: [COFF] Set the IMAGE_DLL_CHARACTERISTICS_NO_SEH flag automatically

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 11:44:43 PST 2017


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D41252#957037, @mstorsjo wrote:

> Only set the flag on x86.


Can you confirm that this is consistent with MSVC? If so, looks good!



================
Comment at: COFF/Writer.cpp:692
+  if (!SEHTable && !Symtab->findUnderscore("_load_config_used") &&
+      Config->Machine == I386)
+    PE->DLLCharacteristics |= IMAGE_DLL_CHARACTERISTICS_NO_SEH;
----------------
nit: I'd test the Machine first to short-circuit out of the symbol lookup for x64.


https://reviews.llvm.org/D41252





More information about the llvm-commits mailing list