I have a hostapp.cpp
that loads a object.so
shared object at run-time, the shared object is compiled using only with the needed .h files from the host app but at run-time it needs to access those functions (present at the host app).
Compiling the host app with -rdynamic
apparently solves this issue but it unnecessarily exposes the object to the full symbol table of the host app, even though it only needs to resolve a few of them.
How can I specify exactly what host-app symbols will be known by the shared object?
Edit: I'm building and running on GNU/Linux with the GNU toolchain.