[lld] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 10:13:59 PST 2024
================
@@ -105,6 +105,12 @@ void elf::reportRangeError(uint8_t *loc, const Relocation &rel, const Twine &v,
hint = "; references '" + lld::toString(*rel.sym) + '\'';
else if (auto *d = dyn_cast<Defined>(rel.sym))
hint = ("; references section '" + d->section->name + "'").str();
+
+ if (rel.type == R_X86_64_PC32 && rel.sym->getOutputSection() &&
----------------
MaskRay wrote:
This also needs a `emachine == EM_X86_64` check.
https://github.com/llvm/llvm-project/pull/73045
More information about the llvm-commits
mailing list