diff --git a/lld/ELF/Arch/ARM.cpp b/lld/ELF/Arch/ARM.cpp --- a/lld/ELF/Arch/ARM.cpp +++ b/lld/ELF/Arch/ARM.cpp @@ -140,7 +140,7 @@ // 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.h b/lld/ELF/Relocations.h --- a/lld/ELF/Relocations.h +++ b/lld/ELF/Relocations.h @@ -40,7 +40,6 @@ R_GOTPLT, R_GOTPLTREL, R_GOTREL, - R_HINT, R_NEG_TLS, R_NONE, R_PC, diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -1250,8 +1250,8 @@ 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(expr)) + // Ignore R_*_NONE and other marker relocations. + if (expr == R_NONE) return; // We can separate the small code model relocations into 2 categories: