Ensure .AliasedSymbol() is called on all uses of getSymbol(). Affects ARM and MIPS ELF backends.
Fixes PR11877 llvm-svn: 149180
This commit is contained in:
parent
4efe5064c3
commit
b47489d4ef
|
@ -69,7 +69,7 @@ const MCSymbol *ARMELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm,
|
|||
const MCFragment &F,
|
||||
const MCFixup &Fixup,
|
||||
bool IsPCRel) const {
|
||||
const MCSymbol &Symbol = Target.getSymA()->getSymbol();
|
||||
const MCSymbol &Symbol = Target.getSymA()->getSymbol().AliasedSymbol();
|
||||
bool EmitThisSym = false;
|
||||
|
||||
const MCSectionELF &Section =
|
||||
|
|
|
@ -53,7 +53,7 @@ const MCSymbol *MipsELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm,
|
|||
const MCFixup &Fixup,
|
||||
bool IsPCRel) const {
|
||||
assert(Target.getSymA() && "SymA cannot be 0.");
|
||||
const MCSymbol &Sym = Target.getSymA()->getSymbol();
|
||||
const MCSymbol &Sym = Target.getSymA()->getSymbol().AliasedSymbol();
|
||||
|
||||
if (Sym.getSection().getKind().isMergeableCString() ||
|
||||
Sym.getSection().getKind().isMergeableConst())
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// RUN: llvm-mc -triple arm-unknown-unknown %s
|
||||
|
||||
i:
|
||||
.long g
|
||||
g = h
|
||||
h = i
|
|
@ -0,0 +1,6 @@
|
|||
// RUN: llvm-mc -triple mips-unknown-unknown %s
|
||||
|
||||
i:
|
||||
.long g
|
||||
g = h
|
||||
h = i
|
Loading…
Reference in New Issue