This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc emit wrong symbols in multiple inheritance case
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