https://sourceware.org/bugzilla/show_bug.cgi?id=28973
Eyal Rozenberg <eyalroz1 at gmx dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|NOTABUG |--- Status|RESOLVED |UNCONFIRMED --- Comment #2 from Eyal Rozenberg <eyalroz1 at gmx dot com> --- (In reply to Alan Modra from comment #1) > The related gcc "bug" has been around since 2009, and no one wanting an > improvement in the error message has been bothered enough to write a patch. The large majority of people who would benefit from a better error message are those programmers who do not know what the error message even means. Either they are yet to encounter it, or they have encountered it, and just figured something was off with their object and fixed it by examining its code overall. The second large group is the one you mentioned: > Anyone hitting the error does a web search and quickly finds what "vtable > for" means. No one of these users will have a strong motivation to fix that themselves, since they now know what the error message means. But these groups are large, and so is the aggregate waste of their time. > That indicates to me that this linker bug will sit here forever > too. It will sit here until either the ld or GCC maintainers do something about their end of this problem. > I am not going to write a patch, but if someone did want to emit a slightly > better message, you'd need to look at ldmain.c:undefined_symbol and match > symbols starting with "_ZTV" to emit a slightly better message mentioning > "the first non-pure non-inline virtual member function" of the type. I don't know who-does-what in binutils or ld specifically, so I can't tell you to write such a patch, but - one of the maintainers should. Unless I am mistaken, a simple patch with a change to the error message string only should not take a maintainer very long to write and integrate. In fact, probably less time than our discussion here. > I > don't know how the linker can know the key function B::foo in the example. This question was discussed on the GCC bug, and people (not me) say that the compiler would need to pass additional information in the object file for the linker to be able to figure out that is the case. Bottom line: Your text acknowledges that this _is_ an outstanding bug, so unresolving. -- You are receiving this mail because: You are on the CC list for the bug.