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
diff --git a/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp b/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
index 9c2f81e..196e17f 100644
--- a/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
+++ b/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
@@ -53,7 +53,7 @@
                                                     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())