I'd like to ship libfoo.a
, which is composed of foo.o
--which in turn depends on libVendorBar.a
and libVendorZoo.a
.
When I link and generate my libfoo.a
I notice that symbols in libVendor*.a
are still public and visible for potential client applications to link against.
Due to many reasons outside of my control, I absolutely do not want 3rd party clients to be able to directly link against the vendor libraries.
How do I force gcc to resolve all libVendor symbols for libfoo and discard them, so that only symbols from libfoo are visible?
I'm not using any LD_FLAGS
currently and everything is statically linked.