[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Geoff's gmon_start fix to binutil works! (fwd)

On Sun, 15 Oct 2000, Christopher C. Chimelis wrote:

> I'll give this a go later tonight on Alpha.  The DEFAULT_VTABLE_THUNKS
> change from 1 to 2 in gcc/config/alpha/linux-elf.h was committed on
> 2000-04-12 (the change was the only one made to that file, no other code
> in that file was affected).

Just for information, while looking into where and why this change was
made (and how much code was affected), I saw this in the changes to a texi

The original implementation of thunks (version 1) had a bug regarding
virtual base classes; this bug is fixed with version 2 of the thunks
implementation. With setting the version to 2, compatibility to the
version 1 thunks is provided, at the cost of extra machine code. Version
3 does not include this compatibility.

Like all options that change the ABI, all C++ code, @emph{including
libgcc.a} must be built with the same setting of this option. Since
version 1 and version 2 are also incompatible (for classes with virtual
bases defining virtual functions), all code must also be compiled with
the same version.

On some targets (e.g. Linux/GNU), version 2 thunks are the default. On
these targets, no option or -fvtable-thunks will produce version 2
thunks. On all other targets, not giving the option will use the
traditional implementation, and -fvtable-thunks will produce version 2

This explains quite a bit and it seems that some Linux targets will
need to change the default down to 1 if they hope to keep binary
compatibility on a C++ front (affected targets appear to be arm, rs6000,
i386, alpha, and sparc, but could be more extensive eventually).

I'll start the build now with the change to the affected alpha files and
see how that goes.


Reply to: