Date: Tue, 19 Apr 2022 23:49:44 +0200 From: Joerg Sonnenberger <joerg@bec.de> To: freebsd-hackers@freebsd.org Subject: Re: llvm & RTTI over shared libraries Message-ID: <Yl8ueD0z7lFhCXHm@bec.de> In-Reply-To: <sJFawz_zShI2kxleBBVrBWLp5qW5ampgaEfL6ko6PzYYzCcrCb7ztk9Lsw8cOgrLpzEQ0sh3xIMysGXvnUDOAVEbRNbth6JMYYnfboDry-s=@insane.engineer> References: <sJFawz_zShI2kxleBBVrBWLp5qW5ampgaEfL6ko6PzYYzCcrCb7ztk9Lsw8cOgrLpzEQ0sh3xIMysGXvnUDOAVEbRNbth6JMYYnfboDry-s=@insane.engineer>
next in thread | previous in thread | raw e-mail | index | archive | help
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. 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. 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. Joerg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Yl8ueD0z7lFhCXHm>