summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-01-10 02:03:30 +0000
committerDale Johannesen <dalej@apple.com>2008-01-10 02:03:30 +0000
commit7ecb3b79c7f3cadda88f743bf190096fcfca716b (patch)
treede34c97a8c7fd3894c847b61979f1533545c681e /llvm/lib/Target
parent2cbf2f39ee179276c3534a3cb31d15fa6005fcf0 (diff)
downloadbcm5719-llvm-7ecb3b79c7f3cadda88f743bf190096fcfca716b.tar.gz
bcm5719-llvm-7ecb3b79c7f3cadda88f743bf190096fcfca716b.zip
Emit unused EH frames for weak definitions on Darwin,
because assembler/linker can't cope with weak absolutes. PR 1880. llvm-svn: 45811
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp7
-rw-r--r--llvm/lib/Target/TargetAsmInfo.cpp1
-rw-r--r--llvm/lib/Target/X86/X86TargetAsmInfo.cpp7
3 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index 016a7555ed2..0cb2fe4573f 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -51,8 +51,8 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM)
StaticDtorsSection = ".mod_term_func";
}
UsedDirective = "\t.no_dead_strip\t";
- WeakDefDirective = "\t.weak_definition\t";
- WeakRefDirective = "\t.weak_reference\t";
+ WeakDefDirective = "\t.weak_definition ";
+ WeakRefDirective = "\t.weak_reference ";
HiddenDirective = "\t.private_extern\t";
SupportsExceptionHandling = true;
NeedsIndirectEncoding = true;
@@ -62,12 +62,13 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM)
DwarfEHFrameSection =
".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
DwarfExceptionSection = ".section __DATA,__gcc_except_tab";
+ GlobalEHDirective = "\t.globl\t";
+ SupportsWeakOmittedEHFrame = false;
DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
- GlobalEHDirective = "\t.globl\t";
DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp
index d7769bf11c5..b87abafc75a 100644
--- a/llvm/lib/Target/TargetAsmInfo.cpp
+++ b/llvm/lib/Target/TargetAsmInfo.cpp
@@ -86,6 +86,7 @@ TargetAsmInfo::TargetAsmInfo() :
SupportsExceptionHandling(false),
DwarfRequiresFrameSection(true),
GlobalEHDirective(0),
+ SupportsWeakOmittedEHFrame(true),
DwarfSectionOffsetDirective(0),
DwarfAbbrevSection(".debug_abbrev"),
DwarfInfoSection(".debug_info"),
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
index 6bfc326f20d..a872778f00c 100644
--- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -76,8 +76,8 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
SetDirective = "\t.set";
PCSymbol = ".";
UsedDirective = "\t.no_dead_strip\t";
- WeakDefDirective = "\t.weak_definition\t";
- WeakRefDirective = "\t.weak_reference\t";
+ WeakDefDirective = "\t.weak_definition ";
+ WeakRefDirective = "\t.weak_reference ";
HiddenDirective = "\t.private_extern\t";
// In non-PIC modes, emit a special label before jump tables so that the
@@ -93,7 +93,6 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
- GlobalEHDirective = "\t.globl\t";
DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
@@ -105,6 +104,8 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
// Exceptions handling
if (!Subtarget->is64Bit())
SupportsExceptionHandling = true;
+ GlobalEHDirective = "\t.globl\t";
+ SupportsWeakOmittedEHFrame = false;
AbsoluteEHSectionOffsets = false;
DwarfEHFrameSection =
".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
OpenPOWER on IntegriCloud