In this episode, we will explore what vtables mean in terms of bytes within ELF files.
Build Output
On Linux, GCC produces ELF files as the result of the compilation process. In our project, the file is a.out
, and we can use the file
command to get details about it:
$ file a.out
a.out: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a87e1cb2356338a14f1a9aa2fef85fb7036bee65, for GNU/Linux 3.2.0, not stripped
If the compiler has generated vtables for Base
and Derived
, there must be corresponding symbols and bytes in the binary.