From 5550f62778e67ea478b57eaa5df8d38cc3e0bac3 Mon Sep 17 00:00:00 2001 From: Richard Osborne Date: Wed, 22 Jul 2009 11:01:00 +0000 Subject: [PATCH] Thread local globals don't require special handling by the linker and so can be placed in the standard data / bss sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76735 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/XCore/XCoreTargetAsmInfo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Target/XCore/XCoreTargetAsmInfo.cpp b/lib/Target/XCore/XCoreTargetAsmInfo.cpp index 07cee8fb6bb..842c427b3b2 100644 --- a/lib/Target/XCore/XCoreTargetAsmInfo.cpp +++ b/lib/Target/XCore/XCoreTargetAsmInfo.cpp @@ -29,6 +29,13 @@ XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM) SectionFlags::Small); BSSSection_ = getNamedSection("\t.dp.bss", SectionFlags::Writeable | SectionFlags::BSS | SectionFlags::Small); + + // TLS globals are lowered in the backend to arrays indexed by the current + // thread id. After lowering they require no special handling by the linker + // and can be placed in the standard data / bss sections. + TLSDataSection = DataSection; + TLSBSSSection = BSSSection_; + if (TM.getSubtargetImpl()->isXS1A()) { ReadOnlySection = getNamedSection("\t.dp.rodata", SectionFlags::None | SectionFlags::Writeable | -- 2.34.1