This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

linking application with a library


Hi all,

I am using h8300-hitachi-hms-gcc cross-complier for building my application.
I have a lib mylib.a (20 kb) which I want to link with my application.
My application gets 20 kb bigger as soon as I link it with mylib.a 
without any function being called from mylib.a.
It seems to me that I have built mylib.a so that the whole lib is linked 
during linking process even if no one method is being called.
Now my question is which flag should I use to build mylib.a so that only 
those functions are linked which are being called.
If no function is called then linking mylib.a shouldn't affect the size 
of my application.

Thanks for help.

regards
/Mohammad


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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