[PATCH] D73518: [ELF] Mention symbol name in reportRangeError()
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 23:55:51 PST 2020
MaskRay marked an inline comment as done.
MaskRay added a comment.
The improved diagnostics helped me locate a bug today (D73606 <https://reviews.llvm.org/D73606>) :)
================
Comment at: lld/ELF/Relocations.cpp:105
+ hint = "; references " + lld::toString(*rel.sym) +
+ getDefinedLocation(*rel.sym);
+
----------------
peter.smith wrote:
> grimar wrote:
> > It can probably print "references local symbol" for local symbols?
> >
> Another possibility would be to distinguish between symbol and PLT entry for symbol. I think that could be a future improvement though.
Regarding `; references local symbol`
A local symbol can only be referenced from within the same file. It is usually not easy to trigger a relocation overflow.
I think more than 99% cases are relocations referencing global symbols. We can start from global symbols first.
> Another possibility would be to distinguish between symbol and PLT entry for symbol. I think that could be a future improvement though.
Ack.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73518/new/
https://reviews.llvm.org/D73518
More information about the llvm-commits
mailing list