diff options
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index a69b714..b0cdd63 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -2424,8 +2424,10 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal( if (GVar->hasAttribute("toc-data")) { SmallString<128> Name; getNameWithPrefix(Name, GO, TM); + XCOFF::SymbolType symType = + GO->hasCommonLinkage() ? XCOFF::XTY_CM : XCOFF::XTY_SD; return getContext().getXCOFFSection( - Name, Kind, XCOFF::CsectProperties(XCOFF::XMC_TD, XCOFF::XTY_SD), + Name, Kind, XCOFF::CsectProperties(XCOFF::XMC_TD, symType), /* MultiSymbolsAllowed*/ true); } |