diff options
author | Eric Christopher <echristo@apple.com> | 2010-05-17 21:02:07 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-05-17 21:02:07 +0000 |
commit | bf792385996b1e27dea1d146345d1125bfe0b6e1 (patch) | |
tree | 52456aff1496a5b3584d65db6488d7a329e3d971 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 96fa4845f7c0be1ca0dae2eae34d6dfcb1452a79 (diff) | |
download | bcm5719-llvm-bf792385996b1e27dea1d146345d1125bfe0b6e1.tar.gz bcm5719-llvm-bf792385996b1e27dea1d146345d1125bfe0b6e1.zip |
Add some section and constant support for darwin TLS.
llvm-svn: 103974
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 00e1e83cf18..5bb33c2e357 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -461,6 +461,20 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx, = getContext().getMachOSection("__DATA", "__data", 0, SectionKind::getDataRel()); + TLSDataSection // .tdata + = getContext().getMachOSection("__DATA", "__thread_data", + MCSectionMachO::S_THREAD_LOCAL_REGULAR, + SectionKind::getDataRel()); + TLSBSSSection // .tbss + = getContext().getMachOSection("__DATA", "__thread_bss", + MCSectionMachO::S_THREAD_LOCAL_ZEROFILL, + SectionKind::getThreadBSS()); + + // TODO: Verify datarel below. + TLSTLVSection // .tlv + = getContext().getMachOSection("__DATA", "__thread_vars", + MCSectionMachO::S_THREAD_LOCAL_VARIABLES, + SectionKind::getDataRel()); CStringSection // .cstring = getContext().getMachOSection("__TEXT", "__cstring", MCSectionMachO::S_CSTRING_LITERALS, @@ -646,7 +660,7 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, const MCSection *TargetLoweringObjectFileMachO:: SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler *Mang, const TargetMachine &TM) const { + Mangler *Mang, const TargetMachine &TM) const { assert(!Kind.isThreadLocal() && "Darwin doesn't support TLS"); if (Kind.isText()) |