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] |
Hi all, Is it possible to reduce the size of files generated by gcc? By default it seems to be including functions such as malloc,etc. which highly inflates it size. An example is this simple program:- int main() { int i,j; for (i = 0 ; i < 100 ; i++) { j = j + i; } return 0; } When i use the following command it generates an elf file ~ 130K and when stripped an intel hex file ~28K:- arm-elf-gcc -O3 cexample.c -o cexample.elf arm-elf-strip cexample.elf -o cexample.hex -0 ihex GCC successfully converts the program to a small Arm assembly program ~300 bytes, but links in extra functions. Any help is greatly appreciated, Thanks, Dave McKenna -- http://www.iol.ie ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |