Re: Re: [arm-gnu] Huge Code Size CodeSourcery G++ Lite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: [arm-gnu] Huge Code Size CodeSourcery G++ Lite
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: Re: Re: [arm-gnu] Huge Code Size CodeSourcery G++ Lite
- From: Kishore <kitts.mailinglists@xxxxxxxxx>
- Date: Fri, 01 Jul 2011 10:17:14 +0530
On Friday 01 Jul 2011 6:39:41 AM 42Bastian wrote:
> Hi
>
> > Recently, I tried building a project on Cortex-M3 using the CodeSourcery G++ Lite. However, the size of the binary becomes huge.
> >
> > As a comparison to a commercial toolchain, here is the difference of the .bin for a simple "blink" application:
> >
> > Commercial IDE: 4.6KB
> > Eclipse IDE with CodeSourcery G++ Lite: 14.3KB
> >
> > Any ideas? Is this normal, or are we making some stupid mistakes?
>
> Commercial tool chains often do automatically what LD needs to be told:
> Remove unused sections.
>
> Try linking with --gc-sections
...And also try adding --ffunction-sections and -fdata-sections to your compile options.
Cheers!
Kishore