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: 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. That's the key function and determines the translation unit (and by extension the DSO) where the virtual table and the typeinfo is placed. 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. Joerg