From c947ad2a2d68f91ead632d3da66ad33cf8d9cfcf Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Sat, 6 Jul 2013 17:17:31 +0000 Subject: Emit personality function and Dwarf EH data for Win64 SEH. Obviously the personality function should be emitted as language handler instead of the hard coded _GCC_specific_handler. The language specific data must be placed after the unwind information therefore it must not be emitted into a separate section. Reviewed by Charles Davis and Nico Rieck. llvm-svn: 185761 --- llvm/lib/MC/MCObjectFileInfo.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp') diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 96b62f1..1be20c3 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -547,11 +547,16 @@ void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) { // though it contains relocatable pointers. In PIC mode, this is probably a // big runtime hit for C++ apps. Either the contents of the LSDA need to be // adjusted or this should be a data section. - LSDASection = - Ctx->getCOFFSection(".gcc_except_table", - COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | - COFF::IMAGE_SCN_MEM_READ, - SectionKind::getReadOnly()); + if (T.getOS() == Triple::Win32) { + // On Windows with SEH, the LSDA is emitted into the .xdata section + LSDASection = 0; + } else { + LSDASection = + Ctx->getCOFFSection(".gcc_except_table", + COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | + COFF::IMAGE_SCN_MEM_READ, + SectionKind::getReadOnly()); + } // Debug info. DwarfAbbrevSection = -- cgit v1.1