user258367
user258367

Reputation: 3407

binary compatibility break because of virtual function

I came across this binary comptibility article binary_compatibiliy_new_virtuals_to_a_non-leaf_class.
If i have a linux software which has multiple shared library and one binary which is loading all those libraries. I added a virtual function in a class which is used entirely in only one shared library. Will this point mentioned in this link will still be valid? As per my understanding virtual table is present in shared library and if i am making any change which is not going to be touched by outside world then i should not worry about binary compatibility of that change.

Upvotes: 1

Views: 421

Answers (1)

Kevin
Kevin

Reputation: 25269

you would break binary compatibility if you had an external client (that did not get recompiled) that was using that particular class. So in your case the class that changed in the .so file is either not exposed as part of the external interface, or is not used by your app. In either case your app will continue to function.

Upvotes: 1

Related Questions