Re: llvm & RTTI over shared libraries
- In reply to: Mark Millard : "Re: llvm & RTTI over shared libraries"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Apr 2022 22:13:37 UTC
Am Tue, Apr 26, 2022 at 05:48:00PM -0700 schrieb Mark Millard: > • Joerg Sonnenberger <joerg_at_bec.de> wrote on > • Date: Tue, 26 Apr 2022 23:47:23 UTC : > > > Am Mon, Apr 25, 2022 at 03:39:48PM -0700 schrieb Mark Millard: > > > Basically I avoid inline definitions of: > > > > > > virtual ~type_base(); > > > virtual ~type_int(); > > > virtual ~type_string(); > > > > You only need to ensure that the class has one non-pure non-inline > > function. > > I'm confused at what you are claiming that I did wrong or > described incorrectly for the example at hand. I'm giving the exact rule to make sure the OP knows what exactly to follow. Otherwise they can test a chance, discover that in their use case an inlined dtor actually works because something else is the key function etc. I don't disagree with your example, I just want to make sure that it is understood what the critical point is. > > If there is no such function, both will be defined as weak > > mergable symbol and that will not result in a unique address when using > > RTLD_LOCAL. > > I was certainly less detailed about how multiple definitions > are handled. Was that your point? I added that note because it also tells you what symptoms to look for to diagnose the issue. E.g. it is normally a bad sign in C++ to see weak vtable and type symbols and something that should be checked. Joerg