On Friday, January 19, 2024, Frederick Virchanza Gotham wrote: > > Or, instead of waiting until after all the vtables and typeinfo's have > been generated, I can populate my array as and when these things are > generated (I imagine this might be easier than waiting until they're all > generated, but whatever works). > Having thought about this a little more, I realise that it's the C++ compiler that generates the vtables and typeinfo's, and so, inside the source code for the linker, what I'll need to do is: (1) After all the object files have been loaded in, make a finite list of all typeinfo's and vtables (2) Generate my array that maps typeinfo's to vtable pointers (3) Place my array somewhere inside a section inside the ELF binary (4) Provide the two linker symbols __map_typeinfohash_vtable and __map_typeinfohash_vtable_size