r/linux • • May 24 '20

Analyzing The Simplest C++ Program

https://oneraynyday.github.io/dev/2020/05/03/Analyzing-The-Simplest-C++-Program/
235 Upvotes

21 comments sorted by

View all comments

22

u/reini_urban May 24 '20 edited May 24 '20

Had to fix the linker loader confusion there. And it's not much about C++, 99% is about C.

The C++ part should talk about the class layout, vtable and virtual functions, the different calling convention (__thiscall, MSABI), typeinfo and such.

6

u/OneRaynyDay May 24 '20

Hey, you're totally correct and thank you for the change. I'm a human and I make typos too so I appreciate you opening the PR :) it's merged now.

Unfortunately, I've spent my time learning C++ most of the time and it would be dubious for me to assume that the same file layout exists for C for the same program(although I later discovered this to be true, as the output executables were exactly the same size).