[cxx-abi-dev] There is no obligation to unique virtual tables

Gabriel Dos Reis gdr at integrable-solutions.net
Mon Feb 18 00:38:56 UTC 2013


On Sun, Feb 17, 2013 at 3:58 PM, Jason Merrill <jason at redhat.com> wrote:
> On 02/16/2013 08:58 PM, John McCall wrote:
>>
>> GCC stopped even uniquing _ZTS's by
>> default as of GCC 4.5, using a new comparison scheme on all platforms
>> (which, incidentally, I think would be worth documenting as an official
>> alternative, if anyone from GCC would mind describing the rules they use).
>
>
> _ZTSs are no less unique now than they were before; we just accepted that
> RTLD_LOCAL prevents reliably uniquing symbols.  For data that really needs
> to be unique such as template static data members, we introduced
> STB_GNU_UNIQUE, but we decided that it was too expensive to use for _ZTSs,
> so we left them only mostly unique, and started doing string comparison
> instead of pointer comparison.  For types local to a translation unit we
> still do pointer comparison.
>
> Jason

John, I believe it is a reasonable thing to ask for *amendment* to the
ABI to get
the leeway you would like to get -- though I suspect the wording would be more
involved than what I've seen so far.

However, we can't pretend that the ABI never asked for uniqueness of these
artefacts or that nobody depended on them.

-- Gaby


More information about the cxx-abi-dev mailing list