gcc emit wrong symbols in multiple inheritance case
Brian Dessent
brian@dessent.net
Thu Jul 31 16:54:00 GMT 2008
Bo Yang wrote:
> When we produce an exe from a single c++ file, there is no linking
> need, so there is no problem. But when we separate the definition and
That's not how it works, the linker is always required to produce an
executable.
> And Obviously, this is not a linker error, it is the problem gcc
> generate a " U __ZThn4_N6bottom4fun1Ev@4" for indeed existing
> definition of "__attribute__((__stdcall__)) bottom:fun1()" .
The "U" lines are correct and aren't the problem; those are call sites
to the properly mangled symbol name. What's incorrect is that gcc emits
the function definitions (the 'T' lines) without the proper stdcall name
mangling. If gcc used the proper mangling for the definitions then the
undefined call sites would no longer be undefined and would not show up
in the objdump output any more.
Brian
More information about the Gcc
mailing list