ld includes entire archive (.a) when compiling .elf file
Daniel Jacobowitz
drow@false.org
Fri Mar 10 22:34:00 GMT 2006
More information about the Binutils mailing list
Fri Mar 10 22:34:00 GMT 2006
- Previous message (by thread): ld includes entire archive (.a) when compiling .elf file
- Next message (by thread): ld includes entire archive (.a) when compiling .elf file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Mar 10, 2006 at 05:29:25PM -0500, Daniel Jacobowitz wrote: > 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. BTW, I see that you were using GCC; --no-whole-archive probably doesn't get to LD, nor --gc-sections. You have to use -Wl for those options. But --whole-archive should be the default anyway. -- Daniel Jacobowitz CodeSourcery
- Previous message (by thread): ld includes entire archive (.a) when compiling .elf file
- Next message (by thread): ld includes entire archive (.a) when compiling .elf file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list