Thank you, Andrew, actually, I figured that out after I sent this question to the ML. However, the next question, which seems to be the core of the problem arises: What I really want to make sure is that at runtime, local symbols (the ones not exported) will have precedence over exported (colliding) symbols of other libs. Is that the case? Thanks again, Chris Andrew Haley schrieb: > Chris Miller wrote: > > >> I have created a shared lib and want to make sure I only export those >> symbols that should be accessible from external. >> I manage to do that fine with "#pragma GCC visibility" switches for all >> my "own" symbols. >> However my lib also statically links OpenSSL and the linker exports all >> symbols in libssl too. >> >> That is a problem because it creates a symbol collision - so how can I >> keep the linker from also exporting the symbols of libs (*.a) statically >> linked to my shared lib? >> > > You'll need to write a linker script. There are plenty of examples around, > some even in the gcc sources, or you can ask the binutils list. > > Andrew. > > >