How to extract Virtual Table informations from a shared library?

雨燕双飞 提交于 2019-12-06 09:54:57

Finally we found a way to do that. It was not so complicated. In our case, the virtual tables addresses are in the .dynsym section of the ELF shared library file. And then the content of the virtual table is available on the .rela.dyn section. So we have to find the address and the size of every virtual table and then just read the .rela.dyn section to find the functions.

Of course, this is absolutely not portable, but in our case, this is not a problem.

0000000000400e80 w O .rodata 0000000000000020 vtable for Test

i use the command "objdump -x a.out | c++ filt" and get the output above, obviously the vtable stored in the read only section as our expect. thank you for your advice.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!