Here's my situation
I have a shared library (PIC) foo.so. It uses symbols from bar.a. bar.a is NPIC. So can't be added to link line of foo.so.
foo.so is dynamically loaded from main.C It loads fine but at run time when a symbol from bar.a is used, it exits with unresolved symbol.
2 solutions I have been suggested 1. Compile bar.a PIC and add it to the link line of foo.so 2. Use " -Wl,--whole-archive bar.a -rdynamic" on main.C link line
1 is not possible because bar.a is a third party library. 2 is not possible because we dont' want our symbols to be exported.
Are there any other idioms/solutions to get around this problem?