I am using a performance analysis tool. One thing I do is to estimate the cost of calling a function. To do this, I need to know whether this function is virtual in the shared library.
To do this, I have access to the shared library assembly. I also have a schedule of execution calls. I canβt do anything at runtime; analysis must be done after runtime using information that I can get from the call schedule and shared libraries.
The only way I thought was to extract the vtable from the library and see if my function is in the vtable, but I did not find a way to extract the vtable of the class from the assembly.
I tried
readelf -s -W lib.so | c++filt | grep vtable
but this only gives me the address of a good vtable (at least I think that it is one), and this address will not lead to anything.
Shared library compiled with gcc 4.3.5
Does anyone know a way to get this table? Or at least someone knows a way to find out if a function is virtual in a shared library?
thanks a lot
source share