[PATCH] D145199: [ELF] Mention section name and offset for STT_SECTION in reportRangeError()

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 01:33:50 PST 2023


peter.smith accepted this revision.
peter.smith added a comment.
This revision is now accepted and ready to land.

Looks like a good improvement, one small suggestion on the text, but no strong opinion on it if you prefer the original.



================
Comment at: lld/ELF/Relocations.cpp:106
+    else if (auto *d = dyn_cast<Defined>(rel.sym))
+      hint = ("; references " + d->section->name + "+" + Twine(d->value)).str();
+  }
----------------
One small suggestion, could use `"; references section " as that makes the +0 form a bit less surprising. I guess for cases like .text, .data etc. it will be obvious that it is a section symbol, but for some user defined names it might be less obvious.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145199/new/

https://reviews.llvm.org/D145199



More information about the llvm-commits mailing list