How to relink existing shared library with extra object file

Posted by awy on Stack Overflow See other posts from Stack Overflow or by awy
Published on 2010-04-11T09:57:41Z Indexed on 2010/04/11 10:03 UTC
Read the original article Hit count: 229

Filed under:
|

I have existing Linux shared object file (shared library) which has been stripped. I want to produce a new version of the library with some additional functions included. I had hoped that something like the following would work, but does not:

ld -o newlib.so newfuncs.o --whole-archive existinglib.so

I do not have the source to the existing library. I could get it but getting a full build environment with the necessary dependencies in place would be a lot of effort for what seems like a simple problem.

© Stack Overflow or respective owner

Related posts about linker

Related posts about shared-memory