This is the mail archive of the
mailing list for the binutils project.
How to use ar to create a library file without external reference to system library files?
- From: Peng Yu <pengyu dot ut at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 9 Dec 2013 19:25:30 -0600
- Subject: How to use ar to create a library file without external reference to system library files?
- Authentication-results: sourceware.org; auth=none
I use something like the following to create libmy.a. However, if
there is any reference from x1.o or x2.o to other system libraries
that may be at different address across different versions of a OS
(say Mac OS 10.8 vs 10.9). Then, the libmy.a will not work as one
wants it to be. Is there a way to create libmy.a such that not only
everything in x1.o and x2.o, but also anything referenced
(recursively) in by x1.o and x2.o are in libmy.a? Thanks.
ar cr libmy.a x1.o x2.o