diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-12-06 03:34:42 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-12-06 03:34:42 +0000 |
commit | a00a62acd02a94aabecc94ac551d8bb305ed7265 (patch) | |
tree | f5f495b93ffff6afd6af21554eef0c3c16b5e903 /lib/MC/ELFObjectWriter.cpp | |
parent | 2bcc789a9d730cc0b5ae403fedf5565fe40dd577 (diff) |
Explicit symbols for gnu mimicing relocations. Patch by Jack Carter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | lib/MC/ELFObjectWriter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 02e1b3ab98..132e81788d 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -1831,6 +1831,20 @@ void MipsELFObjectWriter::WriteEFlags() { ELF::EF_MIPS_ARCH_32R2); } +const MCSymbol *MipsELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm, + const MCValue &Target, + const MCFragment &F, + const MCFixup &Fixup, + bool IsPCRel) const { + assert(Target.getSymA() && "SymA cannot be 0."); + const MCSymbol &Sym = Target.getSymA()->getSymbol(); + + if (Sym.getSection().getKind().isMergeable1ByteCString()) + return &Sym; + + return NULL; +} + unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel, |