Hi,
does anyone know how to make a static library, say
libA.a, of a given shared library
libA.so ? Is that possible at all? (needless to mention that I don't have the sources of
libA.so)
Related to that question is how to merge two shared libraries
libA.so and
libB.so so that all references between
libA and
libB are internally resolved. That means later on, when linking something to
libAB.so, no dependencies to
libA.so nor to
libB.so shall persist.
Obviously the naive approaches
Code:
ar -cr libA.a libA.so
and
Code:
ld -shared -soname libAB.so -o libab.so libA.so libB.so
do not solve the problem. I browsed the several man pages in the binutils package but could not find the answer there. Maybe objcopy could do the trick?
Hope someone can help me here.
Best,
vro