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 | 8116ca5134b355b897450f9a537c9c77e1f08723 (patch) | |
tree | c5f9fa283fdd0558bd3c75c4297602619de8969d /lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 65eb482e8fcd6084d83793aeb767ef0bddefc92a (diff) |
Add full bss data support for darwin tls variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104414 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 8376819858..605e2a817b 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/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; |