linking question

H. J. Lu hjl@lucon.org
Tue Dec 21 16:10:00 GMT 2004


On Tue, Dec 21, 2004 at 04:59:22PM +0100, Karsten Fuhrmann wrote:
> Hello,
> I want to compile a c program with both static and dynamic linking in 
> the same program, e.g. i want to link against LIB_A  static but against 
> LIB_B shared.
> I dicovered the static and dy options in ld but it seems to me that it 
> is only possible to link at whole static or dynamic, but not mixed.

# gcc ... -Wl,-Bstatic -la -Wl,-Bdynamic -lb


H.J.



More information about the Binutils mailing list