From: Anton Korobeynikov Date: Mon, 30 Mar 2009 17:37:43 +0000 (+0000) Subject: Fix thinko: put stuff with both global and local relocations into data.rel{.ro},... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=29519b1de0daa0c94a16ab163199235a7f82e1f0;p=oota-llvm.git Fix thinko: put stuff with both global and local relocations into data.rel{.ro}, not .local git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68036 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 3d24c023c63..6bf7fd693b5 100644 --- a/lib/Target/ELFTargetAsmInfo.cpp +++ b/lib/Target/ELFTargetAsmInfo.cpp @@ -58,11 +58,11 @@ ELFTargetAsmInfo::SectionKindForGlobal(const GlobalValue *GV) const { bool isConstant = GVar->isConstant(); unsigned Reloc = RelocBehaviour(); if (Reloc != Reloc::None && C->ContainsRelocations(Reloc)) - return (C->ContainsRelocations(Reloc::Local) ? + return (C->ContainsRelocations(Reloc::Global) ? (isConstant ? - SectionKind::DataRelROLocal : SectionKind::DataRelLocal) : + SectionKind::DataRelRO : SectionKind::DataRel) : (isConstant ? - SectionKind::DataRelRO : SectionKind::DataRel)); + SectionKind::DataRelROLocal : SectionKind::DataRelLocal)); } return Kind;