In particular, the way most C++ implementations work implies that a
change in the size of a base class requires a recompilation of all
derived classes.
This statement is from stroustrup book.
So if base class is in a .so file and we just change a member function implementation, then does it mean that we don’t have to recompile my program linked to that shared object?
Formally, if you don’t recompile you’re violating the One Definition Rule, and get undefined behavior.
Practically, as long as the member function you modify hasn’t been inlined anywhere, and you aren’t changing the signature, you probably retain binary compatibility. On most platforms. If you’re lucky, your platform documentation provides such a guarantee.