how to reduce executable compiled file

Rhenzo Losso rhenzo at gmail.com
Tue Apr 3 16:15:46 UTC 2012


Try to change some argument o sparc-rtems-objcopy such this line below:

"sparc-rtems-objcopy -O binary name_of_source_ exe name_of_binary.bin"

that  is the "same" line I use on my ARM, excpet it arm-rtems-objcopy not
sparc-rtems-objcopy.



2012/4/3 Luca Cinquepalmi <cinquepalmi at planetek.it>

>  In  my Makefile I also use these commands:
>
> sparc-rtems-strip $@.exe
> sparc-rtems-objcopy --remove-section=.comment $@.exe
>
> but the final .exe file is always large, about 300KB from the original 3MB.
> Should I use other commands? Thanks
>
>
>
> Il 03/04/2012 18.04, Rhenzo Losso ha scritto:
>
> Greetings,
>
> Maybe you can use the sparc-rtems-objdump or sparc-rtems-strip. I'm using
> RTEMS on arm processor (CSN637 port) and I use arm-rtems-objcopy to
> transform the arm.exe into arm.bin. It reduce from 2MB to near 147kB.
>
>
>
> 2012/4/3 Luca Cinquepalmi <cinquepalmi at planetek.it>
>
>> Hi all,
>> I'm new of the list and I have a simple question. I compiled a simple
>> "Hello World" c code
>> with sparc-rtems-gcc, but the generated executable is about 3MB, so much
>> for my use...
>> I don't know why the executable file is so large... How can I reduce its
>> size?
>> Thank you
>>
>>     Luca
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
>>
>
>
>
> --
> Rhenzo Losso
> Bacharel em Ciência da Computação - UNESP / São José do Rio Preto
>
> Instituto Tecnológico de Aeronáutica
> Praça Marechal do Ar Eduardo Gomes, no. 50 - Sala 253 - Projeto ITASAT
> Vila das Acácias
> 12228-900 Sao Jose dos Campos, SP, Brazil
> +55 012 3947-6903 (Sala do ITA)
>
>
>


-- 
Rhenzo Losso
Bacharel em Ciência da Computação - UNESP / São José do Rio Preto

Instituto Tecnológico de Aeronáutica
Praça Marechal do Ar Eduardo Gomes, no. 50 - Sala 253 - Projeto ITASAT
Vila das Acácias
12228-900 Sao Jose dos Campos, SP, Brazil
+55 012 3947-6903 (Sala do ITA)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120403/d2d05780/attachment-0001.html>


More information about the users mailing list