diff options
author | Eric Christopher <echristo@apple.com> | 2010-05-22 00:10:22 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-05-22 00:10:22 +0000 |
commit | 6fdea1bda839653c05a523e20760997d59dfb030 (patch) | |
tree | 6b622f0bae00fe3721d3d056ad5562edd6c83de1 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | ea465e1847a91f8b62b7f92ecf94a1338a0dc2d1 (diff) | |
download | bcm5719-llvm-6fdea1bda839653c05a523e20760997d59dfb030.tar.gz bcm5719-llvm-6fdea1bda839653c05a523e20760997d59dfb030.zip |
Add full bss data support for darwin tls variables.
llvm-svn: 104414
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 83768198585..605e2a817b1 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -627,6 +627,8 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx, getContext().getMachOSection("__DWARF", "__debug_inlined", MCSectionMachO::S_ATTR_DEBUG, SectionKind::getMetadata()); + + TLSExtraDataSection = TLSTLVSection; } const MCSection *TargetLoweringObjectFileMachO:: @@ -666,9 +668,13 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, const MCSection *TargetLoweringObjectFileMachO:: SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler *Mang, const TargetMachine &TM) const { - assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS"); + Mangler *Mang, const TargetMachine &TM) const { + + // Handle one kind of thread local... + if (Kind.isThreadBSS()) return TLSBSSSection; + assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS"); + if (Kind.isText()) return GV->isWeakForLinker() ? TextCoalSection : TextSection; |