C++ areas again

Nick Burrett nick at sqrt.co.uk
Thu Dec 9 09:06:29 PST 2004


Peter Naulls said:

> Well, that certainly sounds correct, and I've put the patch in as well
> as fixed drlink, but it doesn't seem to have fixed the root problem.
> I'm pretty sure I've rebuild everything relevant:
>
> Error: Size of common area 'C$$.gnu.linkonce.t._ZN6BadGuyD1Ev' in
> 'leveleditor.o' differs from definition in 'badguy.o' (240 != 224))
>
> It's interesting that the 3rd size difference is only 4 bytes.

Then it could simply be down to optimisation differences.  The problem we
are faced with is that drlink is too strict.  One function compiled with
optimisation and one without is obviously going to have a size and content
mismatch.

It may be better if we relax drlink's rules in the circumstance when we
are comparing two COMDEF, LINKONCE areas.  Let drlink select the area with
smallest size (pointing to better, or some, optimisation).

If we don't, then I feel that we will never resolve this problem and the
user will find the problem too confusing to understand.

Nick.





More information about the gcc mailing list