[rtems commit] powerpc/gen5200: Add per-section compilation and linking support.

Joel Sherrill joel at rtems.org
Sat Jan 23 21:22:56 UTC 2016


Module:    rtems
Branch:    master
Commit:    6d21c13e5094d490280a941cf0e8333f91f85715
Changeset: http://git.rtems.org/rtems/commit/?id=6d21c13e5094d490280a941cf0e8333f91f85715

Author:    Ralph Holmes <ralph at ybden.com>
Date:      Sat Jan 23 21:15:40 2016 +0000

powerpc/gen5200: Add per-section compilation and linking support.

For the brs5l BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 140000	   2272	   7904	 150176	  24aa0	base_sp.exe
 148800	   2112	   7872	 158784	  26c40	hello.exe
  99072	   1824	   4576	 105472	  19c00	minimum.exe
 665664	  11840	  21088	 698592	  aa8e0	fileio.exe
 164768	   2368	   8000	 175136	  2ac20	nsecs.exe
 201984	   2656	   8512	 213152	  340a0	paranoia.exe
 143296	   2272	   7936	 153504	  257a0	ticker.exe
 142752	   2304	  11680	 156736	  26440	unlimited.exe
 939040	 154112	  15584	1108736	 10eb00	cxx_iostream.exe
 252736	  10368	   8576	 271680	  42540	cdtest.exe
 251200	   2784	   9728	 263712	  40620	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
 116832	   2240	   7872	 126944	  1efe0	base_sp.exe
 123424	   2080	   7840	 133344	  208e0	hello.exe
  45472	   1568	   4000	  51040	   c760	minimum.exe
 628064	  11808	  20320	 660192	  a12e0	fileio.exe
 142304	   2336	   8000	 152640	  25440	nsecs.exe
 178240	   2624	   8512	 189376	  2e3c0	paranoia.exe
 120384	   2272	   7904	 130560	  1fe00	ticker.exe
 118080	   2272	  11648	 132000	  203a0	unlimited.exe
 583968	 141024	  14720	 739712	  b4980	cxx_iostream.exe
 230048	   9888	   8576	 248512	  3cac0	cdtest.exe
 225216	   2720	   9696	 237632	  3a040	capture.exe

For the brs6l BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 140096	   2272	   7904	 150272	  24b00	base_sp.exe
 148896	   2112	   7872	 158880	  26ca0	hello.exe
  99136	   1824	   4576	 105536	  19c40	minimum.exe
 665696	  11840	  21088	 698624	  aa900	fileio.exe
 164832	   2368	   8000	 175200	  2ac60	nsecs.exe
 202080	   2656	   8512	 213248	  34100	paranoia.exe
 143392	   2272	   7936	 153600	  25800	ticker.exe
 142848	   2304	  11680	 156832	  264a0	unlimited.exe
 939136	 154112	  15584	1108832	 10eb60	cxx_iostream.exe
 252800	  10368	   8576	 271744	  42580	cdtest.exe
 251296	   2784	   9728	 263808	  40680	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
 116896	   2240	   7872	 127008	  1f020	base_sp.exe
 123520	   2080	   7840	 133440	  20940	hello.exe
  45568	   1568	   4000	  51136	   c7c0	minimum.exe
 628096	  11808	  20320	 660224	  a1300	fileio.exe
 142368	   2336	   8000	 152704	  25480	nsecs.exe
 178304	   2624	   8512	 189440	  2e400	paranoia.exe
 120448	   2272	   7904	 130624	  1fe40	ticker.exe
 118144	   2272	  11648	 132064	  203e0	unlimited.exe
 584032	 141024	  14720	 739776	  b49c0	cxx_iostream.exe
 230144	   9888	   8576	 248608	  3cb20	cdtest.exe
 225280	   2720	   9696	 237696	  3a080	capture.exe

For the dp2 BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 139488	   2272	   7968	 149728	  248e0	base_sp.exe
 148288	   2112	   7936	 158336	  26a80	hello.exe
  98528	   1824	   4640	 104992	  19a20	minimum.exe
 665376	  11840	  21152	 698368	  aa800	fileio.exe
 164224	   2368	   8064	 174656	  2aa40	nsecs.exe
 201504	   2656	   8576	 212736	  33f00	paranoia.exe
 142784	   2272	   8000	 153056	  255e0	ticker.exe
 142272	   2304	  11744	 156320	  262a0	unlimited.exe
 938528	 154112	  15648	1108288	 10e940	cxx_iostream.exe
 252224	  10368	   8640	 271232	  42380	cdtest.exe
 250688	   2784	   9824	 263296	  40480	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
 116320	   2240	   7936	 126496	  1ee20	base_sp.exe
 122912	   2080	   7904	 132896	  20720	hello.exe
  44864	   1568	   4064	  50496	   c540	minimum.exe
 627744	  11808	  20384	 659936	  a11e0	fileio.exe
 141792	   2336	   8064	 152192	  25280	nsecs.exe
 177728	   2624	   8576	 188928	  2e200	paranoia.exe
 119872	   2272	   7968	 130112	  1fc40	ticker.exe
 117568	   2272	  11712	 131552	  201e0	unlimited.exe
 583456	 141024	  14784	 739264	  b47c0	cxx_iostream.exe
 229536	   9888	   8640	 248064	  3c900	cdtest.exe
 224736	   2720	   9792	 237248	  39ec0	capture.exe

For the icecube BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 139008	   2272	   7808	 149088	  24660	base_sp.exe
 147808	   2112	   7776	 157696	  26800	hello.exe
  98080	   1824	   4480	 104384	  197c0	minimum.exe
 664800	  11840	  20992	 697632	  aa520	fileio.exe
 163776	   2368	   7904	 174048	  2a7e0	nsecs.exe
 201024	   2656	   8448	 212128	  33ca0	paranoia.exe
 142304	   2272	   7840	 152416	  25360	ticker.exe
 141792	   2304	  11584	 155680	  26020	unlimited.exe
 938048	 154112	  15488	1107648	 10e6c0	cxx_iostream.exe
 251744	  10368	   8480	 270592	  42100	cdtest.exe
 250208	   2784	   9664	 262656	  40200	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
 115904	   2272	   7776	 125952	  1ec00	base_sp.exe
 122496	   2080	   7744	 132320	  204e0	hello.exe
  44480	   1568	   3904	  49952	   c320	minimum.exe
 627264	  11808	  20224	 659296	  a0f60	fileio.exe
 141376	   2368	   7904	 151648	  25060	nsecs.exe
 177312	   2656	   8416	 188384	  2dfe0	paranoia.exe
 119456	   2272	   7808	 129536	  1fa00	ticker.exe
 117152	   2272	  11552	 130976	  1ffa0	unlimited.exe
 583040	 141024	  14624	 738688	  b4580	cxx_iostream.exe
 229152	   9888	   8480	 247520	  3c6e0	cdtest.exe
 224320	   2720	   9632	 236672	  39c80	capture.exe

For the pm520_cr825 BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 139328	   2272	   7968	 149568	  24840	base_sp.exe
 148128	   2112	   7936	 158176	  269e0	hello.exe
  98368	   1824	   4640	 104832	  19980	minimum.exe
 665088	  11840	  21152	 698080	  aa6e0	fileio.exe
 164064	   2368	   8064	 174496	  2a9a0	nsecs.exe
 201312	   2656	   8576	 212544	  33e40	paranoia.exe
 142624	   2272	   8000	 152896	  25540	ticker.exe
 142112	   2304	  11744	 156160	  26200	unlimited.exe
 938368	 154112	  15648	1108128	 10e8a0	cxx_iostream.exe
 252032	  10368	   8640	 271040	  422c0	cdtest.exe
 250528	   2784	   9824	 263136	  403e0	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
 116160	   2240	   7936	 126336	  1ed80	base_sp.exe
 122752	   2080	   7904	 132736	  20680	hello.exe
  44768	   1568	   4064	  50400	   c4e0	minimum.exe
 627488	  11808	  20384	 659680	  a10e0	fileio.exe
 141632	   2336	   8064	 152032	  251e0	nsecs.exe
 177568	   2624	   8576	 188768	  2e160	paranoia.exe
 119712	   2272	   7968	 129952	  1fba0	ticker.exe
 117408	   2272	  11712	 131392	  20140	unlimited.exe
 583296	 141024	  14784	 739104	  b4720	cxx_iostream.exe
 229376	   9888	   8640	 247904	  3c860	cdtest.exe
 224544	   2720	   9792	 237056	  39e00	capture.exe

For the pm520_ze30 BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 139456	   2272	   7968	 149696	  248c0	base_sp.exe
 148256	   2112	   7936	 158304	  26a60	hello.exe
  98496	   1824	   4640	 104960	  19a00	minimum.exe
 665216	  11840	  21152	 698208	  aa760	fileio.exe
 164192	   2368	   8064	 174624	  2aa20	nsecs.exe
 201408	   2656	   8576	 212640	  33ea0	paranoia.exe
 142720	   2272	   8000	 152992	  255a0	ticker.exe
 142240	   2304	  11744	 156288	  26280	unlimited.exe
 938496	 154112	  15648	1108256	 10e920	cxx_iostream.exe
 252160	  10368	   8640	 271168	  42340	cdtest.exe
 250624	   2784	   9824	 263232	  40440	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
 116288	   2240	   7936	 126464	  1ee00	base_sp.exe
 122880	   2080	   7904	 132864	  20700	hello.exe
  44896	   1568	   4064	  50528	   c560	minimum.exe
 627616	  11808	  20384	 659808	  a1160	fileio.exe
 141760	   2336	   8064	 152160	  25260	nsecs.exe
 177664	   2624	   8576	 188864	  2e1c0	paranoia.exe
 119808	   2272	   7968	 130048	  1fc00	ticker.exe
 117536	   2272	  11712	 131520	  201c0	unlimited.exe
 583392	 141024	  14784	 739200	  b4780	cxx_iostream.exe
 229504	   9888	   8640	 248032	  3c8e0	cdtest.exe
 224672	   2720	   9792	 237184	  39e80	capture.exe

---

 c/src/lib/libbsp/powerpc/gen5200/make/custom/gen5200.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/c/src/lib/libbsp/powerpc/gen5200/make/custom/gen5200.inc b/c/src/lib/libbsp/powerpc/gen5200/make/custom/gen5200.inc
index 91e9238..aca2bf4 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/make/custom/gen5200.inc
+++ b/c/src/lib/libbsp/powerpc/gen5200/make/custom/gen5200.inc
@@ -15,3 +15,6 @@ CPU_CFLAGS = -mcpu=603e -mstrict-align \
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections




More information about the vc mailing list