This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Use ar to merge libraries?
- To: <binutils at sources dot redhat dot com>
- Subject: Use ar to merge libraries?
- From: "Andrew Begel" <abegel at eecs dot berkeley dot edu>
- Date: Wed, 6 Jun 2001 14:13:24 -0700
- Cc: <abegel at cs dot berkeley dot edu>
Without using the MRI librarian compability commands, is there a way for
ar to merge .a files when building a new library?
i.e.
ar cru libbar.a bar1.o bar2.o
ar cru libfoo.a libbar.a foo.o
The result here is libfoo.a, which, if I had my way, would consist of
three .o's, bar1.o, bar2.o and foo.o. However, right now, this gives
*two* entries in libfoo.a, libbar.a and foo.o. Since libbar.a is now
nested inside libfoo.a, normal linking against libfoo.a of symbols
inside bar1.o and bar2.o won't work.
Thanks,
Andrew