This teaches LLD to report visibility when showing undefined symbol errors
and fixes https://bugs.llvm.org/show_bug.cgi?id=40770.
Details
Details
- Reviewers
ruiu • espindola - Commits
- rLLD355909: [LLD][ELF] - Show symbols visibility in "undefined symbol..." error messages.
rG43b6689e6417: [LLD][ELF] - Show symbols visibility in "undefined symbol..." error messages.
rL355909: [LLD][ELF] - Show symbols visibility in "undefined symbol..." error messages.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM
ELF/Relocations.cpp | ||
---|---|---|
687 | nit: if you make Visibility a std::string, you could remove str(). But perhaps this is slightly more straightforward: std::string Msg = "undefined "; if (Sym.Visibility == STV_INTERNAL) Msg += "internal "; else if (Sym.Visibility == STV_HIDDEN) Msg += "hidden "; else if (Sym.Visibility == STV_PROTECTED) Msg += "protected "; Msg += "symbol: " + toString(Sym) + "\n>>> referenced by "; |
nit: if you make Visibility a std::string, you could remove str(). But perhaps this is slightly more straightforward: