This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
problem in linking
- From: "massimiliano cialdi" <cialdi at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 1 Dec 2006 15:46:04 +0100
- Subject: problem in linking
suppose I have the following line
gcc main.o f2.o -ll1 -ll2 -o dummy
and suppose that libraries are:
libl1.a contains f11.o and f12.o
libl2.a contains f21.o and f22.o
in main.c I call explicitly only functions from f11.o and f21.o, so
linker avoids to output f12.o and f22.o in executable file.
However I need f12.o to be outputted in executable file because I use
implicitly some functions.
How can I force the linker to output f12.o from libl1.a to executable
even if no function is called explicitly?
Is it a problem in library creation? Do I need to add f12.o to libl1.a
in a special way?
Do I need to add explicitly f12.o in linking command line?
thanks
--
Massimiliano Cialdi
cialdi@gmail.com
m.cialdi@oksys.it