tags:

views:

79

answers:

2

I have one shared object (a.so) which has statically linked (s.so). b.so also has a static link of s.so.

a.so does a dlopen on b.so , will "s.so" code be shared between the two?

The .so are built on gcc 4.1 on RedHat linux.

The s.so is compiled against a.so and b.so with -Bstatic and --no-whole-archive option.

+2  A: 

Static library code (s.a) is never shared between binaries.

Ignacio Vazquez-Abrams
A: 

Whenever you link with a static library, the code for the functions you use is taken from the static library and placed in the executable or shared library you are producing. So in your case, each shared library will contain its own copy of code from the static library.

anon