aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorKai Nacke <kai.nacke@redstar.de>2013-07-06 17:17:31 +0000
committerKai Nacke <kai.nacke@redstar.de>2013-07-06 17:17:31 +0000
commitc947ad2a2d68f91ead632d3da66ad33cf8d9cfcf (patch)
treea3974df210b6c30e6eba7118d71e7b98b873bbe3 /llvm/lib/MC/MCObjectFileInfo.cpp
parent4417cccba3c0b4fc281b4c05b7e4df1425a3ce0a (diff)
downloadllvm-c947ad2a2d68f91ead632d3da66ad33cf8d9cfcf.zip
llvm-c947ad2a2d68f91ead632d3da66ad33cf8d9cfcf.tar.gz
llvm-c947ad2a2d68f91ead632d3da66ad33cf8d9cfcf.tar.bz2
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
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp15
1 files changed, 10 insertions, 5 deletions
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 =