title: How can I extract static libs containing repeated object files?
body: <p>I'm trying to build a big static library merging two static libraries. In moment I'm using the 'ar' command, extracting objects, for example, from 'a.a' and 'b.a' and then reassembling these objects using 'ar' again:</p>
  
  <pre><code>$ ar x a.a
  $ ar x b.a
  $ ar r merged.a *.o
  </code></pre>
  
  <p>Unfortunately it isn't working for my purpose, since a.a has inside different objects with the SAME NAME. The 'ar' command is extracting the repeated objects and replacing the already extracted ones with the same name. Even with the same name, these objects have different symbols, so I get undefined references since some symbols are being missed together with the replaced files.</p>
  
  <p>I have no access to the original objects and already tried 'ar xP' and 'ar xv' and lots of 'ar stuff'. Does anyone can help me showing how to merge these libs?</p>
  
  <p>Thanks in advance.</p>