This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]