Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Apr 2022 23:03:33 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        joerg@bec.de, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Cc:        jbo@insane.engineer
Subject:   Re: llvm & RTTI over shared libraries 
Message-ID:  <EAB1226B-EE8E-45B1-BC33-EEA6B370AF93@yahoo.com>
References:  <EAB1226B-EE8E-45B1-BC33-EEA6B370AF93.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Joerg Sonnenberger <joerg_at_bec.de> wrote on
Tue, 19 Apr 2022 21:49:44 UTC :

> Am Thu, Apr 14, 2022 at 04:36:24PM +0000 schrieb jbo@insane.engineer:
>> > After some research I seem to understand that the way that RTTI is =
handled over shared library boundaries is different between GCC and =
LLVM.
>>=20
> I think you are running into the old problem that GCC thinks comparing
> types by name makes sense where as everyone else compares types by =
type
> pointer identity.

Seems out of date for the GCC information . . .

https://gcc.gnu.org/faq.html#dso reports:

QUOTE
The new C++ ABI in the GCC 3.0 series uses address comparisons, rather =
than string compares, to determine type equality.
END QUOTE

> GCC is glaringly wrong because types with identical
> names can and often are unrelated. This is especially a problem for
> plugins. The correct way to deal with it is making sure that every =
type
> has a key function of appropiate visibility and making sure that the
> interface library exports them and every plugin links against it.
> If you do that, dlopen without RTLD_GLOBAL or linking the main program
> without -rdynamic works fine.



=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EAB1226B-EE8E-45B1-BC33-EEA6B370AF93>