summaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2020-01-16 14:14:50 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2020-01-16 14:14:50 +0000
commit80500f4ed62960fbcc78e27d8f6e60b3e430764e (patch)
treed55be0ac6c9f334b0e966a63b64ad3896d6a320f /contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp
parentd4633a9e3c37455e0c0ddf76354dbf2160ea34c5 (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp b/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp
index 7df4f8d2b90f..55b315a20d17 100644
--- a/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp
+++ b/contrib/llvm-project/llvm/lib/Object/RelocationResolver.cpp
@@ -103,6 +103,7 @@ static bool supportsMips64(uint64_t Type) {
case ELF::R_MIPS_32:
case ELF::R_MIPS_64:
case ELF::R_MIPS_TLS_DTPREL64:
+ case ELF::R_MIPS_PC32:
return true;
default:
return false;
@@ -117,6 +118,8 @@ static uint64_t resolveMips64(RelocationRef R, uint64_t S, uint64_t A) {
return S + getELFAddend(R);
case ELF::R_MIPS_TLS_DTPREL64:
return S + getELFAddend(R) - 0x8000;
+ case ELF::R_MIPS_PC32:
+ return S + getELFAddend(R) - R.getOffset();
default:
llvm_unreachable("Invalid relocation type");
}