C++ Binary Internals

The idea for this post started out as an exploration of compiler optimizations in GCC. It turned into a static and dynamic C++ class exploration exercise. The piece of code we’ll look at:

// file: bin1.hpp
using namespace std;

class FirstClass
        FirstClass(int new_id) { id = new_id; };
        int get_id() const { return id; };
        int id;