[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
This commit is contained in:
Fangrui Song 2019-12-22 17:01:53 -08:00
parent 7dc4bbf8ab
commit bec1b55c64
3 changed files with 3 additions and 4 deletions

View File

@ -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;
}

View File

@ -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:

View File

@ -40,7 +40,6 @@ enum RelExpr {
R_GOTPLT,
R_GOTPLTREL,
R_GOTREL,
R_HINT,
R_NEG_TLS,
R_NONE,
R_PC,