summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
diff options
context:
space:
mode:
authorJack Carter <jcarter@mips.com>2012-07-13 19:15:47 +0000
committerJack Carter <jcarter@mips.com>2012-07-13 19:15:47 +0000
commit5ddcfda8efd4dc8aad8124a0dd459e636da72ab0 (patch)
tree800525027430292790216a0cbf43f0950e1be6b5 /llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
parent619e75eb961448abb62124864e5b27a7966b00fc (diff)
downloadbcm5719-llvm-5ddcfda8efd4dc8aad8124a0dd459e636da72ab0.tar.gz
bcm5719-llvm-5ddcfda8efd4dc8aad8124a0dd459e636da72ab0.zip
The Mips specific relocation R_MIPS_GOT_DISP
is used in cases where global symbols are directly represented in the GOT and we use an offset into the global offset table. This patch adds direct object support for R_MIPS_GOT_DISP. llvm-svn: 160183
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp')
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
index 9f9272886e0..77c1524531c 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
@@ -156,6 +156,9 @@ unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
case Mips::fixup_Mips_GOT_OFST:
Type = ELF::R_MIPS_GOT_OFST;
break;
+ case Mips::fixup_Mips_GOT_DISP:
+ Type = ELF::R_MIPS_GOT_DISP;
+ break;
case Mips::fixup_Mips_GPOFF_HI:
Type = setRType((unsigned)ELF::R_MIPS_GPREL16, Type);
Type = setRType2((unsigned)ELF::R_MIPS_SUB, Type);
OpenPOWER on IntegriCloud