updates #2577.

For the lpc32xx_mzx BSP variant without this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  59920    1740 33734408        33796068        203afe4 ticker.exe
  24692    1088 33770304        33796084        203aff4 minimum.exe
 592796    2148 33201136        33796080        203aff0 cxx_iostream.exe
 414056    5952 33376076        33796084        203aff4 fileio.exe
 326320   12768 33456988        33796076        203afec pppd.exe
 146728    2504 33646840        33796072        203afe8 capture.exe
  77064    1952 33717072        33796088        203aff8 nsecs.exe
 137172    2244 33656676        33796092        203affc paranoia.exe
 138600    1896 33655576        33796072        203afe8 cdtest.exe
  58128    1740 33736200        33796068        203afe4 base_sp.exe
  62324    1764 33732004        33796092        203affc unlimited.exe
  80796    1844 33713436        33796076        203afec hello.exe
 196520    6652 33592904        33796076        203afec loopback.exe

For the lpc32xx_mzx BSP variant with this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  53781    1728 33740576        33796085        203aff5 ticker.exe
  14988     288 33780808        33796084        203aff4 minimum.exe
 373552    2120 33420412        33796084        203aff4 cxx_iostream.exe
 400208    5940 33389924        33796072        203afe8 fileio.exe
 301008   12616 33482440        33796064        203afe0 pppd.exe
 138944    2484 33654656        33796084        203aff4 capture.exe
  71588    1940 33722548        33796076        203afec nsecs.exe
 131068    2232 33662780        33796080        203aff0 paranoia.exe
 130800    1884 33663408        33796092        203affc cdtest.exe
  52132    1728 33742228        33796088        203aff8 base_sp.exe
  55368    1736 33738960        33796064        203afe0 unlimited.exe
  73564    1792 33720732        33796088        203aff8 hello.exe
 180984    6552 33608544        33796080        203aff0 loopback.exe

For the lpc32xx_mzx_stage_1 BSP variant without this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  51348    1740  192640  245728   3bfe0 ticker.exe
  20608    1088  224032  245728   3bfe0 minimum.exe
 132440    2504  110784  245728   3bfe0 capture.exe
  68564    1952  175232  245748   3bff4 nsecs.exe
 124196    2244  119296  245736   3bfe8 paranoia.exe
 129372    1896  114464  245732   3bfe4 cdtest.exe
  49780    1740  194208  245728   3bfe0 base_sp.exe
  53588    1764  190400  245752   3bff8 unlimited.exe
  73084    1844  170816  245744   3bff0 hello.exe
 172920    6644   66176  245740   3bfec loopback.exe

For the lpc32xx_mzx_stage_1 BSP variant with this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  46928    1728  197088  245744   3bff0 ticker.exe
  13562     288  231904  245754   3bffa minimum.exe
 126656    2484  116608  245748   3bff4 capture.exe
  64704    1940  179104  245748   3bff4 nsecs.exe
 120276    2232  123232  245740   3bfec paranoia.exe
 123188    1884  120672  245744   3bff0 cdtest.exe
  45512    1728  198496  245736   3bfe8 base_sp.exe
  48496    1736  195520  245752   3bff8 unlimited.exe
  67700    1792  176256  245748   3bff4 hello.exe
 160456    6544   78752  245752   3bff8 loopback.exe

For the lpc32xx_mzx_stage_2 BSP variant without this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  59920    1740 4378400 4440060  43bffc ticker.exe
  24692    1088 4414272 4440052  43bff4 minimum.exe
 592796    2148 3845088 4440032  43bfe0 cxx_iostream.exe
 414064    5952 4020032 4440048  43bff0 fileio.exe
 326320   12768 4100960 4440048  43bff0 pppd.exe
 146728    2504 4290816 4440048  43bff0 capture.exe
  77064    1952 4361024 4440040  43bfe8 nsecs.exe
 137172    2244 4300640 4440056  43bff8 paranoia.exe
 138600    1896 4299552 4440048  43bff0 cdtest.exe
  58128    1740 4380192 4440060  43bffc base_sp.exe
  62324    1764 4375968 4440056  43bff8 unlimited.exe
  80796    1844 4357408 4440048  43bff0 hello.exe
 196520    6652 4236864 4440036  43bfe4 loopback.exe

For the lpc32xx_mzx_stage_2 BSP variant with this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  53781    1728 4384544 4440053  43bff5 ticker.exe
  14988     288 4424768 4440044  43bfec minimum.exe
 373552    2120 4064384 4440056  43bff8 cxx_iostream.exe
 400216    5940 4033888 4440044  43bfec fileio.exe
 301008   12616 4126432 4440056  43bff8 pppd.exe
 138944    2484 4298624 4440052  43bff4 capture.exe
  71588    1940 4366528 4440056  43bff8 nsecs.exe
 131068    2232 4306752 4440052  43bff4 paranoia.exe
 130800    1884 4307360 4440044  43bfec cdtest.exe
  52132    1728 4386176 4440036  43bfe4 base_sp.exe
  55368    1736 4382944 4440048  43bff0 unlimited.exe
  73564    1792 4364672 4440028  43bfdc hello.exe
 180984    6552 4252512 4440048  43bff0 loopback.exe

For the lpc32xx_phycore BSP variant without this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  59908    1740 67292952        67354600        403bfe8 ticker.exe
  24680    1088 67328848        67354616        403bff8 minimum.exe
 592784    2148 66759680        67354612        403bff4 cxx_iostream.exe
 414048    5952 66934616        67354616        403bff8 fileio.exe
 326308   12768 67015532        67354608        403bff0 pppd.exe
 146716    2504 67205384        67354604        403bfec capture.exe
  77052    1952 67275616        67354620        403bffc nsecs.exe
 137160    2244 67215220        67354624        403c000 paranoia.exe
 138588    1896 67214120        67354604        403bfec cdtest.exe
  58116    1740 67294744        67354600        403bfe8 base_sp.exe
  62312    1764 67290548        67354624        403c000 unlimited.exe
  80784    1844 67271980        67354608        403bff0 hello.exe
 196508    6652 67151448        67354608        403bff0 loopback.exe

For the lpc32xx_phycore BSP variant with this option, sample executable
sizes were as follows:

   text    data     bss           dec             hex   filename
  53769    1728 67299120        67354617        403bff9 ticker.exe
  14976     288 67339352        67354616        403bff8 minimum.exe
 373540    2120 66978956        67354616        403bff8 cxx_iostream.exe
 400200    5940 66948464        67354604        403bfec fileio.exe
 300996   12616 67040984        67354596        403bfe4 pppd.exe
 138932    2484 67213200        67354616        403bff8 capture.exe
  71576    1940 67281092        67354608        403bff0 nsecs.exe
 131056    2232 67221324        67354612        403bff4 paranoia.exe
 130788    1884 67221952        67354624        403c000 cdtest.exe
  52120    1728 67300772        67354620        403bffc base_sp.exe
  55356    1736 67297504        67354596        403bfe4 unlimited.exe
  73552    1792 67279276        67354620        403bffc hello.exe
 180972    6552 67167088        67354612        403bff4 loopback.exe
---
 c/src/lib/libbsp/arm/lpc32xx/make/custom/lpc32xx.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/c/src/lib/libbsp/arm/lpc32xx/make/custom/lpc32xx.inc 
b/c/src/lib/libbsp/arm/lpc32xx/make/custom/lpc32xx.inc
index 2db07a9..f184741 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/make/custom/lpc32xx.inc
+++ b/c/src/lib/libbsp/arm/lpc32xx/make/custom/lpc32xx.inc
@@ -9,3 +9,6 @@ RTEMS_CPU = arm
 CPU_CFLAGS = -mcpu=arm926ej-s -mthumb
 
 CFLAGS_OPTIMIZE_V ?= -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
-- 
1.8.3.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to