title: How to relink existing shared library with extra object file
body: <p>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:</p>
  
  <pre><code>ld -o newlib.so newfuncs.o --whole-archive existinglib.so
  </code></pre>
  
  <p>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.</p>