Feature request: undefined-symbol hints
Paul Koning
pkoning@equallogic.com
Mon Aug 12 06:21:00 GMT 2002
>>>>> "Martin" == Martin v Löwis <loewis@informatik.hu-berlin.de> writes:
Martin> In C++, the compiler emits a number of implicit symbols
Martin> (vtable, typeinfo). To avoid code duplication, these are only
Martin> defined together with some user-defined symbol (the first
Martin> virtual function in a class).
Martin> If the user fails to define that symbol, the implicit symbols
Martin> are not defined, either. Users are often confused by the
Martin> linker error messages in these cases.
Count me as one confused by those errors. They always went away after
"some tinkering" but I never realized what the magic word is.
It seems to me the solution is NOT to create hacks that produce new
warnings. You described the real problem in the first paragraph. The
compiler/linker should be able to deal with duplicate definitions of
these implicit symbols so the compiler can just emit them and the
linker will make it right. That way these internal things are not
tied to irrelevant details like the first user-defined virtual
function.
paul
More information about the Binutils
mailing list