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]

Re: ld includes entire archive (.a) when compiling .elf file


On Fri, Mar 10, 2006 at 04:57:26PM -0500, Josh Keller wrote:
> I can't figure out what to do.  I have tried the --gc-sections option
> and the --no-whole-archive option but I still get a really large
> executable.  I created my archive from .o files using 
> arm-elf-ar -rcv libucos_ii.a $(OBJS).  
> 
> I can't seem to figure out a good solution.  Any ideas?  I'd rather not
> create an archive file for each .o file (which sort of defeats the
> purpose of having a .a file)  Thanks for the help!

Please try using the -Map option to ld (-Wl,-Map,filename if you're
using GCC).  That will tell you why each file is pulled in.

-- 
Daniel Jacobowitz
CodeSourcery


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