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
so that all references between libA
are internally resolved. That means later on, when linking something to libAB.so
, no dependencies to libA.so
nor to libB.so
Obviously the naive approaches
ar -cr libA.a libA.so
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.