From 3d7780580131bf5a736412bcc3b11610721bd3e2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 2 Aug 2009 01:34:32 +0000 Subject: move getDwarfExceptionSection from TAI to TLOF and rename it to getLSDASection() to be more specific. This makes it pretty obvious that the ELF LSDA section is being specified wrong in PIC mode. We're probably getting a lot of startup-time relocations to a readonly page, which is expensive and bad. Someone who cares about ELF C++ should investigate this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77847 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetAsmInfo.h | 7 ------- include/llvm/Target/TargetLoweringObjectFile.h | 8 ++++++-- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'include/llvm/Target') diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 0eff044..5574ad5 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -371,10 +371,6 @@ namespace llvm { /// const char *DwarfEHFrameSection; // Defaults to ".eh_frame". - /// DwarfExceptionSection - Section directive for Exception table. - /// - const char *DwarfExceptionSection; // Defaults to ".gcc_except_table". - //===--- CBE Asm Translation Table -----------------------------------===// const char *const *AsmTransCBE; // Defaults to empty @@ -637,9 +633,6 @@ namespace llvm { const char *getDwarfEHFrameSection() const { return DwarfEHFrameSection; } - const char *getDwarfExceptionSection() const { - return DwarfExceptionSection; - } const char *const *getAsmCBE() const { return AsmTransCBE; } diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h index ec6b697..377b9ee 100644 --- a/include/llvm/Target/TargetLoweringObjectFile.h +++ b/include/llvm/Target/TargetLoweringObjectFile.h @@ -58,6 +58,10 @@ protected: /// list. const MCSection *StaticDtorSection; + /// LSDASection - If exception handling is supported by the target, this is + /// the section the Language Specific Data Area information is emitted to. + const MCSection *LSDASection; + public: // FIXME: NONPUB. const MCSection *getOrCreateSection(const char *Name, @@ -77,10 +81,10 @@ public: const MCSection *getTextSection() const { return TextSection; } const MCSection *getDataSection() const { return DataSection; } - const MCSection *getStaticCtorSection() const { return StaticCtorSection; } const MCSection *getStaticDtorSection() const { return StaticDtorSection; } - + const MCSection *getLSDASection() const { return LSDASection; } + /// shouldEmitUsedDirectiveFor - This hook allows targets to selectively /// decide not to emit the UsedDirective for some symbols in llvm.used. /// FIXME: REMOVE this (rdar://7071300) -- cgit v1.1