On Sun, Jan 21, 2024 at 3:27 AM Frederick Virchanza Gotham wrote: > I'm still a bit clueless here, but here's what I've got so far, I'm able > to print out a list of all the classes that have both a vtable and a > typeinfo: > > Here's the link to Github showing the changes I've made so far, I've > created two new files 'polymorphism.h' and 'polymorphism.c'. > > > https://github.com/bminor/binutils-gdb/compare/5a75433a122ea1037ccb4e948332f4886e242911...healytpk:linker-vtable:master > > I'm close to getting this working but I'm stuck on something. The function, "_bfd_generic_link_add_one_symbol", is called to add each new symbol, and I'm able to record the names of the vtables and typeinfo's that are encountered. One of the arguments passed to that function is called 'value', and it is the symbol's byte offset within its section. The problem however is that sometimes 'value' is set to 0. I can understand if just one symbol has its offset set to 0 inside its section (i.e. if it's the first thing in the section), but a typeinfo and a vtable for different types can't both be located at the beginning of the same section. Does anyone know why "_bfd_generic_link_add_one_symbol" would be called with an argument of 0 for 'value' when it is defining a symbol?