From 29519b1de0daa0c94a16ab163199235a7f82e1f0 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Mon, 30 Mar 2009 17:37:43 +0000 Subject: [PATCH] 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 --- lib/Target/ELFTargetAsmInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;