================
@@ -105,6 +105,13 @@ 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 (config->emachine == EM_X86_64 && rel.type == R_X86_64_PC32 &&
+        rel.sym->getOutputSection() &&
+        (rel.sym->getOutputSection()->flags & SHF_X86_64_LARGE)) {
+      hint += "; a R_X86_64_PC32 relocation should not reference a section "
----------------
MaskRay wrote:

In the diagnostic the sentence can be more precise. Perhaps `; R_X86_64_PC32 
should not reference a section marked `. In other messages we do use `R_*` to 
refer to a relocation of the type.

https://github.com/llvm/llvm-project/pull/73045
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to