summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-12-22 17:01:53 -0800
committerFangrui Song <maskray@google.com>2020-01-14 10:56:53 -0800
commitbec1b55c64cf33d5f33c8cb7cc10d02e25811bef (patch)
tree9d107378d57b7bff25ce470d6f963f8ae124c9f2
parent7dc4bbf8ab311606388faacca58b6c3e3e508b77 (diff)
downloadbcm5719-llvm-bec1b55c64cf33d5f33c8cb7cc10d02e25811bef.tar.gz
bcm5719-llvm-bec1b55c64cf33d5f33c8cb7cc10d02e25811bef.zip
[ELF] Delete the RelExpr member R_HINT. NFC
R_HINT is ignored like R_NONE. There are no strong reasons to keep R_HINT. The largest RelExpr member R_RISCV_PC_INDIRECT is 60 now. Differential Revision: https://reviews.llvm.org/D71822
-rw-r--r--lld/ELF/Arch/ARM.cpp2
-rw-r--r--lld/ELF/Relocations.cpp4
-rw-r--r--lld/ELF/Relocations.h1
3 files changed, 3 insertions, 4 deletions
diff --git a/lld/ELF/Arch/ARM.cpp b/lld/ELF/Arch/ARM.cpp
index c272562b5b2..de1023346aa 100644
--- a/lld/ELF/Arch/ARM.cpp
+++ b/lld/ELF/Arch/ARM.cpp
@@ -140,7 +140,7 @@ RelExpr ARM::getRelExpr(RelType type, const Symbol &s,
// given address. It can be used to implement a special linker mode which
// rewrites ARMv4T inputs to ARMv4. Since we support only ARMv4 input and
// not ARMv4 output, we can just ignore it.
- return R_HINT;
+ return R_NONE;
default:
return R_ABS;
}
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 1df8a157cfe..4731554e0c0 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -1250,8 +1250,8 @@ static void scanReloc(InputSectionBase &sec, OffsetGetter &getOffset, RelTy *&i,
const uint8_t *relocatedAddr = sec.data().begin() + rel.r_offset;
RelExpr expr = target->getRelExpr(type, sym, relocatedAddr);
- // Ignore "hint" relocations because they are only markers for relaxation.
- if (oneof<R_HINT, R_NONE>(expr))
+ // Ignore R_*_NONE and other marker relocations.
+ if (expr == R_NONE)
return;
// We can separate the small code model relocations into 2 categories:
diff --git a/lld/ELF/Relocations.h b/lld/ELF/Relocations.h
index ca893d21115..bfec1e62885 100644
--- a/lld/ELF/Relocations.h
+++ b/lld/ELF/Relocations.h
@@ -40,7 +40,6 @@ enum RelExpr {
R_GOTPLT,
R_GOTPLTREL,
R_GOTREL,
- R_HINT,
R_NEG_TLS,
R_NONE,
R_PC,
OpenPOWER on IntegriCloud