Re: [arm-gnu] Image size reduction with linker optimization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] Image size reduction with linker optimization



On Thu, 2009-02-05 at 18:36 -0500, Daniel Jacobowitz wrote:
> On Fri, Feb 06, 2009 at 10:30:26AM +1100, James wrote:
> > This may be better asked of the openocd people?
> 
> Yes, we don't support OpenOCD.  Good luck!

Oooeee!  I see the problem.  I am a little embarrassed not to have
looked harder earlier.  It was only when I was asked for both binaries
that I saw the problem...

Compiled with -O0, I see from ls -l;
-rwxr-xr-x 1 james james   85440 2009-02-09 07:48 ct_in.bin
-rwxr-xr-x 1 james james  221506 2009-02-09 07:48 ct_in.elf

But compiled with -Os, I see...
-rwxr-xr-x 1 james james 536878711 2009-02-10 08:04 ct_in.bin
-rwxr-xr-x 1 james james    209230 2009-02-10 08:04 ct_in.elf

What the ?!?!?!?!

Somehow

arm-none-eabi-objcopy obj/ct_in.elf -Obinary obj/ct_in.bin

has produced a monster.

I find this a bit strange,

arm-none-eabi-size obj/ct_in.elf
   text    data     bss     dec     hex filename
  42875    1260   10252   54387    d473 obj/ct_in.elf


Any suggestions?

Regards,
James.