From 153666c0384c724c1a935be44a1afe0319649e3e Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 6 Oct 2010 19:27:21 +0000 Subject: If a symbol is global, reloc against it even if it is in a mergeable section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115817 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/ELFObjectWriter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/MC/ELFObjectWriter.cpp') diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index cbe0ebfa4a..ac8c250a83 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -539,12 +539,12 @@ static bool ShouldRelocOnSymbol(const MCSymbolData &SD, const MCSectionELF &Section = static_cast(Symbol.getSection()); - if (Section.getFlags() & MCSectionELF::SHF_MERGE) - return Target.getConstant() != 0; - if (SD.isExternal()) return true; + if (Section.getFlags() & MCSectionELF::SHF_MERGE) + return Target.getConstant() != 0; + MCSymbolRefExpr::VariantKind Kind = Target.getSymA()->getKind(); const MCSectionELF &Sec2 = static_cast(F.getParent()->getSection()); -- cgit v1.2.3