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

Joel Sherrill joel at rtems.org
Mon Jan 25 00:16:59 UTC 2016


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

Author:    Ralph Holmes <ralph at ybden.com>
Date:      Sun Jan 24 23:43:58 2016 +0000

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

For the br_uid BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 132014	   2292	268235668	268369974	fff0036	base_sp.exe
 140834	   2172	268226948	268369954	fff0022	hello.exe
  90406	   1900	268277648	268369954	fff0022	minimum.exe
 648910	   6274	267714788	268369972	fff0034	fileio.exe
 156786	   2388	268210784	268369958	fff0026	nsecs.exe
 194014	   2676	268173288	268369978	fff003a	paranoia.exe
 135310	   2300	268232372	268369982	fff003e	ticker.exe
 134778	   2316	268232876	268369970	fff0032	unlimited.exe
 931040	 149466	267289440	268369946	fff001a	cxx_iostream.exe
 244738	   9744	268115480	268369962	fff002a	cdtest.exe
 243198	   2796	268123980	268369974	fff0036	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 116842	   2268	268250800	268369910	ffefff6	base_sp.exe
 123466	   2116	268244312	268369894	ffeffe6	hello.exe
  53946	   1632	268314300	268369878	ffeffd6	minimum.exe
 621818	   6246	267741832	268369896	ffeffe8	fileio.exe
 142306	   2364	268225244	268369914	ffefffa	nsecs.exe
 178246	   2652	268188984	268369882	ffeffda	paranoia.exe
 120394	   2276	268247216	268369886	ffeffde	ticker.exe
 118082	   2276	268249536	268369894	ffeffe6	unlimited.exe
 590946	  51722	267727228	268369896	ffeffe8	cxx_iostream.exe
 230498	   8416	268130996	268369910	ffefff6	cdtest.exe
 225250	   2740	268141896	268369886	ffeffde	capture.exe

For the hsc_cm01 BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 132584	   2292	268235092	268369968	fff0030	base_sp.exe
 141404	   2172	268226372	268369948	fff001c	hello.exe
  90944	   1900	268277104	268369948	fff001c	minimum.exe
 649448	   6274	267714244	268369966	fff002e	fileio.exe
 157324	   2388	268210240	268369952	fff0020	nsecs.exe
 194552	   2676	268172744	268369972	fff0034	paranoia.exe
 135848	   2300	268231828	268369976	fff0038	ticker.exe
 135348	   2316	268232300	268369964	fff002c	unlimited.exe
 931608	 149466	267288864	268369938	fff0012	cxx_iostream.exe
 245308	   9744	268114904	268369956	fff0024	cdtest.exe
 243736	   2796	268123436	268369968	fff0030	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 117380	   2268	268250256	268369904	ffefff0	base_sp.exe
 124004	   2116	268243768	268369888	ffeffe0	hello.exe
  54452	   1632	268313788	268369872	ffeffd0	minimum.exe
 622356	   6246	267741288	268369890	ffeffe2	fileio.exe
 142844	   2364	268224700	268369908	ffefff4	nsecs.exe
 178784	   2652	268188440	268369876	ffeffd4	paranoia.exe
 120932	   2276	268246672	268369880	ffeffd8	ticker.exe
 118620	   2276	268248992	268369888	ffeffe0	unlimited.exe
 591484	  51722	267726684	268369890	ffeffe2	cxx_iostream.exe
 231036	   8416	268130452	268369904	ffefff0	cdtest.exe
 225788	   2740	268141352	268369880	ffeffd8	capture.exe

For the mpc8309som BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 132038	   2292	268235572	268369902	ffeffee	base_sp.exe
 140858	   2172	268226852	268369882	ffeffda	hello.exe
  90398	   1900	268277584	268369882	ffeffda	minimum.exe
 648902	   6274	267714724	268369900	ffeffec	fileio.exe
 156778	   2388	268210720	268369886	ffeffde	nsecs.exe
 194006	   2676	268173192	268369874	ffeffd2	paranoia.exe
 135302	   2300	268232276	268369878	ffeffd6	ticker.exe
 134802	   2316	268232780	268369898	ffeffea	unlimited.exe
 931032	 149466	267289376	268369874	ffeffd2	cxx_iostream.exe
 244762	   9744	268115384	268369890	ffeffe2	cdtest.exe
 243190	   2796	268123916	268369902	ffeffee	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 116898	   2268	268250704	268369870	ffeffce	base_sp.exe
 123522	   2116	268244248	268369886	ffeffde	hello.exe
  54002	   1632	268314236	268369870	ffeffce	minimum.exe
 621874	   6246	267741768	268369888	ffeffe0	fileio.exe
 142362	   2364	268225148	268369874	ffeffd2	nsecs.exe
 178302	   2652	268188920	268369874	ffeffd2	paranoia.exe
 120450	   2276	268247152	268369878	ffeffd6	ticker.exe
 118138	   2276	268249472	268369886	ffeffde	unlimited.exe
 591002	  51722	267727132	268369856	ffeffc0	cxx_iostream.exe
 230554	   8416	268130900	268369870	ffeffce	cdtest.exe
 225338	   2740	268141800	268369878	ffeffd6	capture.exe

For the mpc8313erdb BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 131783	   2292	134018100	134152175	7feffef	base_sp.exe
 140603	   2172	134009380	134152155	7feffdb	hello.exe
  90175	   1900	134060080	134152155	7feffdb	minimum.exe
 648679	   6274	133497220	134152173	7feffed	fileio.exe
 156523	   2388	133993248	134152159	7feffdf	nsecs.exe
 193783	   2676	133955688	134152147	7feffd3	paranoia.exe
 135079	   2300	134014772	134152151	7feffd7	ticker.exe
 134547	   2316	134015308	134152171	7feffeb	unlimited.exe
 930808	 149466	133071872	134152146	7feffd2	cxx_iostream.exe
 244507	   9744	133897912	134152163	7feffe3	cdtest.exe
 242967	   2796	133906412	134152175	7feffef	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 116675	   2268	134033200	134152143	7feffcf	base_sp.exe
 123299	   2116	134026744	134152159	7feffdf	hello.exe
  53747	   1632	134096764	134152143	7feffcf	minimum.exe
 621651	   6246	133524264	134152161	7feffe1	fileio.exe
 142139	   2364	134007644	134152147	7feffd3	nsecs.exe
 178079	   2652	133971416	134152147	7feffd3	paranoia.exe
 120227	   2276	134029648	134152151	7feffd7	ticker.exe
 117915	   2276	134031968	134152159	7feffdf	unlimited.exe
 590779	  51722	133509628	134152129	7feffc1	cxx_iostream.exe
 230331	   8416	133913396	134152143	7feffcf	cdtest.exe
 225083	   2740	133924328	134152151	7feffd7	capture.exe

For the mpc8349eamds BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 132452	   2292	268235220	268369964	fff002c	base_sp.exe
 141272	   2172	268226500	268369944	fff0018	hello.exe
  90812	   1900	268277232	268369944	fff0018	minimum.exe
 649316	   6274	267714372	268369962	fff002a	fileio.exe
 157192	   2388	268210368	268369948	fff001c	nsecs.exe
 194420	   2676	268172840	268369936	fff0010	paranoia.exe
 135716	   2300	268231924	268369940	fff0014	ticker.exe
 135216	   2316	268232428	268369960	fff0028	unlimited.exe
 931444	 149466	267289024	268369934	fff000e	cxx_iostream.exe
 245176	   9744	268115032	268369952	fff0020	cdtest.exe
 243604	   2796	268123564	268369964	fff002c	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 117248	   2268	268250352	268369868	ffeffcc	base_sp.exe
 123872	   2116	268243896	268369884	ffeffdc	hello.exe
  54352	   1632	268313884	268369868	ffeffcc	minimum.exe
 622224	   6246	267741416	268369886	ffeffde	fileio.exe
 142712	   2364	268224796	268369872	ffeffd0	nsecs.exe
 178652	   2652	268188568	268369872	ffeffd0	paranoia.exe
 120800	   2276	268246800	268369876	ffeffd4	ticker.exe
 118488	   2276	268249120	268369884	ffeffdc	unlimited.exe
 591352	  51722	267726780	268369854	ffeffbe	cxx_iostream.exe
 230904	   8416	268130548	268369868	ffeffcc	cdtest.exe
 225688	   2740	268141448	268369876	ffeffd4	capture.exe

---

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

diff --git a/c/src/lib/libbsp/powerpc/gen83xx/make/custom/gen83xx.inc b/c/src/lib/libbsp/powerpc/gen83xx/make/custom/gen83xx.inc
index 7293ec0..023d6ef 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/make/custom/gen83xx.inc
+++ b/c/src/lib/libbsp/powerpc/gen83xx/make/custom/gen83xx.inc
@@ -18,3 +18,6 @@ CPU_CFLAGS = -mcpu=603e -meabi -msdata=sysv -fno-common -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