diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2012-02-11 17:26:53 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2012-02-11 17:26:53 +0000 |
commit | d4a19b6a72d19a6f90b676aac37118664b7b7a84 (patch) | |
tree | 9c63b3d4288efc19f18610519a9aeeafb6a7df45 /lib/MC | |
parent | 6b30274e27fc65752abb2e1fe48b538ccd824a24 (diff) | |
download | external_llvm-d4a19b6a72d19a6f90b676aac37118664b7b7a84.zip external_llvm-d4a19b6a72d19a6f90b676aac37118664b7b7a84.tar.gz external_llvm-d4a19b6a72d19a6f90b676aac37118664b7b7a84.tar.bz2 |
Add support for implicit TLS model used with MS VC runtime.
Patch by Kai Nacke!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCExpr.cpp | 1 | ||||
-rw-r--r-- | lib/MC/MCObjectFileInfo.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/MC/MCExpr.cpp b/lib/MC/MCExpr.cpp index ccdccdf..f3a91cb 100644 --- a/lib/MC/MCExpr.cpp +++ b/lib/MC/MCExpr.cpp @@ -188,6 +188,7 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) { case VK_TPOFF: return "TPOFF"; case VK_DTPOFF: return "DTPOFF"; case VK_TLVP: return "TLVP"; + case VK_SECREL: return "SECREL"; case VK_ARM_PLT: return "(PLT)"; case VK_ARM_GOT: return "(GOT)"; case VK_ARM_GOTOFF: return "(GOTOFF)"; diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index 4c03aaa..1b86535 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -495,6 +495,12 @@ void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) { COFF::IMAGE_SCN_MEM_READ | COFF::IMAGE_SCN_MEM_WRITE, SectionKind::getDataRel()); + TLSDataSection = + Ctx->getCOFFSection(".tls$", + COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | + COFF::IMAGE_SCN_MEM_READ | + COFF::IMAGE_SCN_MEM_WRITE, + SectionKind::getDataRel()); } void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm, |