25% PowerPC code size increase since last September?

Joel Sherrill joel.sherrill at oarcorp.com
Sun Jun 28 15:53:01 UTC 2015



On June 28, 2015 10:47:13 AM CDT, Peter Dufault <dufault at hda.com> wrote:
>
>> On Jun 28, 2015, at 11:05 , Peter Dufault <dufault at hda.com> wrote:
>> 
>> In updating the Phytec MPC5554 to this mornings build I see a large
>code size increase.  It will no longer fit in the 2MB FLASH on the
>MPC5554, which is a problem.  Here are the sizes of the binaries, the
>first one built two days ago against the RTEMS in September and the
>second one using the identical user code base and this morning’s RTEMS.
>I haven’t done much to analyze this yet other than to verify it’s still
>being built with the same optimization flags.
>> 
>> -rwxrwxr-x 1 pjd usergrp 1624684 Jun 26 09:42 fw.bin.gcc4.8.2
>> -rwxrwxr-x 1 pjd usergrp 2017220 Jun 28 10:48 fw.bin
>> 
>> Has anyone else noticed this?  Does anyone regularly monitor the size
>of the test suite binaries to watch for changes?  Are there new options
>that should be set to disable new features that add size overhead?
>> 
>> I’ll start looking through the maps to see if it is new code or the
>compiler, the compiler has gone from 4.8.2 to 4.9.2.
>> 
>
>I think it’s mostly new C++ overhead, some interpreter type code (I
>mean similar to scanf, etc, with a fixed overhead for supporting all
>strings) is now pulling in all kinds of money conversions, etc, that
>weren’t there before.
>
>I calculated the increase in size due to symbols containing “std::” has
>gone up by 236,295 bytes without any changes to the user code. That’s a
>big chunk of the 392,536 bytes show above.
>
>There are also a bunch of new shell commands that are pulling in new
>code, that might be a lot of the rest.

This can be configured down.

But overall, you may want to try per element data and function sections on the compile and link. See the SPARC bsps for a reference. They had quite a bit of code removed in the tests building with those options. But you have to get the linker script right for things to still work. Sections need an asterisk to wild card the per method/data item sections. 

And you may have to mark some sections as KEEP. Or they won't have a dependency to get them in.

>Peter
>-----------------
>Peter Dufault
>HD Associates, Inc.      Software and System Engineering
>
>_______________________________________________
>devel mailing list
>devel at rtems.org
>http://lists.rtems.org/mailman/listinfo/devel

--joel


More information about the devel mailing list