From: David Majnemer Date: Mon, 1 Jun 2015 07:34:26 +0000 (+0000) Subject: [WinCOFF] Ignore .safeseh for non-x86 architectures X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=64f16f53322d08bcd814d0de4019d778cbeb2ffa;p=oota-llvm.git [WinCOFF] Ignore .safeseh for non-x86 architectures We don't want to bother with creating .sxdata sections on Win64; all the relevant information is already in the .pdata section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238730 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/WinCOFFStreamer.cpp b/lib/MC/WinCOFFStreamer.cpp index abbe4164958..f007b5ee7c8 100644 --- a/lib/MC/WinCOFFStreamer.cpp +++ b/lib/MC/WinCOFFStreamer.cpp @@ -159,6 +159,12 @@ void MCWinCOFFStreamer::EndCOFFSymbolDef() { } void MCWinCOFFStreamer::EmitCOFFSafeSEH(MCSymbol const *Symbol) { + // SafeSEH is a feature specific to 32-bit x86. It does not exist (and is + // unnecessary) on all platforms which use table-based exception dispatch. + if (getContext().getObjectFileInfo()->getTargetTriple().getArch() != + Triple::x86) + return; + if (Symbol->getFlags() & COFF::SF_SafeSEH) return;