mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
Ensure .AliasedSymbol() is called on all uses of getSymbol(). Affects ARM and MIPS ELF backends.
Fixes PR11877 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
518ff566f5
commit
2d8955a77c
@ -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())
|
||||
|
6
test/MC/ARM/pr11877.s
Normal file
6
test/MC/ARM/pr11877.s
Normal file
@ -0,0 +1,6 @@
|
||||
// RUN: llvm-mc -triple arm-unknown-unknown %s
|
||||
|
||||
i:
|
||||
.long g
|
||||
g = h
|
||||
h = i
|
6
test/MC/Mips/pr11877.s
Normal file
6
test/MC/Mips/pr11877.s
Normal file
@ -0,0 +1,6 @@
|
||||
// RUN: llvm-mc -triple mips-unknown-unknown %s
|
||||
|
||||
i:
|
||||
.long g
|
||||
g = h
|
||||
h = i
|
Loading…
Reference in New Issue
Block a user