[lld] da1973a - [ELF][Mips] Drop an unneeded config->relocatable check
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 21:01:19 PST 2020
Author: Fangrui Song
Date: 2020-01-31T21:00:28-08:00
New Revision: da1973a24147ecc5829e1a1bb61d21b59549ade3
URL: https://github.com/llvm/llvm-project/commit/da1973a24147ecc5829e1a1bb61d21b59549ade3
DIFF: https://github.com/llvm/llvm-project/commit/da1973a24147ecc5829e1a1bb61d21b59549ade3.diff
LOG: [ELF][Mips] Drop an unneeded config->relocatable check
Added:
Modified:
lld/ELF/InputSection.cpp
Removed:
################################################################################
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index dc544fac40c9..e19680440cc6 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -465,7 +465,7 @@ void InputSection::copyRelocations(uint8_t *buf, ArrayRef<RelTy> rels) {
if (!RelTy::IsRela)
addend = target->getImplicitAddend(bufLoc, type);
- if (config->emachine == EM_MIPS && config->relocatable &&
+ if (config->emachine == EM_MIPS &&
target->getRelExpr(type, sym, bufLoc) == R_MIPS_GOTREL) {
// Some MIPS relocations depend on "gp" value. By default,
// this value has 0x7ff0 offset from a .got section. But
More information about the llvm-commits
mailing list