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

Joel Sherrill joel at rtems.org
Sun Jan 24 17:09:28 UTC 2016


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

Author:    Ralph Holmes <ralph at ybden.com>
Date:      Sun Jan 24 16:55:49 2016 +0000

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

For the gwlcfm BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 130456	   2176	 604348	 736980	  b3ed4	base_sp.exe
 145008	   2068	 604372	 751448	  b7758	hello.exe
  89149	   1784	 604580	 695513	  a9cd9	minimum.exe
 654485	   6166	 600356	1261007	 133dcf	fileio.exe
 155086	   2272	 604256	 761614	  b9f0e	nsecs.exe
 222388	   2560	 603964	 828912	  ca5f0	paranoia.exe
 133784	   2184	 604340	 740308	  b4bd4	ticker.exe
 133028	   2208	 604316	 739552	  b48e0	unlimited.exe
 942776	 148018	 603668	1694462	 19dafe	cxx_iostream.exe
 249184	   9364	 603780	 862328	  d2878	cdtest.exe
 247820	   2680	 603844	 854344	  d0948	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 114908	   2152	 604372	 721432	  b0218	base_sp.exe
 127012	   2012	 604428	 733452	  b310c	hello.exe
  51580	   1512	 604852	 657944	  a0a18	minimum.exe
 627093	   6130	 600388	1233611	 12d2cb	fileio.exe
 140298	   2248	 604280	 746826	  b654a	nsecs.exe
 206144	   2528	 603996	 812668	  c667c	paranoia.exe
 118524	   2160	 604364	 725048	  b1038	ticker.exe
 115732	   2160	 604364	 722256	  b0550	unlimited.exe
 600120	  51210	 603964	1255294	 13277e	cxx_iostream.exe
 234616	   8048	 604260	 846924	  cec4c	cdtest.exe
 229652	   2624	 603900	 836176	  cc250	capture.exe

For the mpc5566evb BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 130540	   2136	 653540	 786216	  bff28	base_sp.exe
 145092	   2028	 653564	 800684	  c37ac	hello.exe
  89233	   1744	 653772	 744749	  b5d2d	minimum.exe
 654573	   6126	 649548	1310247	 13fe27	fileio.exe
 155202	   2232	 653448	 810882	  c5f82	nsecs.exe
 222472	   2520	 653156	 878148	  d6644	paranoia.exe
 133868	   2144	 653532	 789544	  c0c28	ticker.exe
 133112	   2168	 653508	 788788	  c0934	unlimited.exe
 942892	 147978	 652860	1743730	 1a9b72	cxx_iostream.exe
 249268	   9324	 652972	 911564	  de8cc	cdtest.exe
 247904	   2640	 653036	 903580	  dc99c	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 114928	   2112	 653564	 770604	  bc22c	base_sp.exe
 127064	   1972	 653620	 782656	  bf140	hello.exe
  51600	   1472	 654044	 707116	  aca2c	minimum.exe
 627117	   6090	 649580	1282787	 1392e3	fileio.exe
 140318	   2208	 653472	 795998	  c255e	nsecs.exe
 206164	   2488	 653188	 861840	  d2690	paranoia.exe
 118544	   2120	 653556	 774220	  bd04c	ticker.exe
 115752	   2120	 653556	 771428	  bc564	unlimited.exe
 600172	  51170	 653156	1304498	 13e7b2	cxx_iostream.exe
 234668	   8008	 653452	 896128	  dac80	cdtest.exe
 229672	   2584	 653092	 885348	  d8264	capture.exe

For the mpc5566evb_spe BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 131572	   2136	 653540	 787248	  c0330	base_sp.exe
 146188	   2028	 653564	 801780	  c3bf4	hello.exe
  89777	   1744	 653772	 745293	  b5f4d	minimum.exe
 656118	   6126	 649548	1311792	 140430	fileio.exe
 156554	   2232	 653448	 812234	  c64ca	nsecs.exe
 228144	   2520	 653156	 883820	  d7c6c	paranoia.exe
 134900	   2144	 653532	 790576	  c1030	ticker.exe
 134176	   2168	 653508	 789852	  c0d5c	unlimited.exe
 943724	 151734	 652860	1748318	 1aad5e	cxx_iostream.exe
 250804	   9848	 652972	 913624	  df0d8	cdtest.exe
 249216	   2640	 653036	 904892	  dcebc	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 115992	   2112	 653564	 771668	  bc654	base_sp.exe
 128160	   1972	 653620	 783752	  bf588	hello.exe
  52192	   1472	 654044	 707708	  acc7c	minimum.exe
 628782	   6090	 649580	1284452	 139964	fileio.exe
 141702	   2208	 653472	 797382	  c2ac6	nsecs.exe
 211812	   2488	 653188	 867488	  d3ca0	paranoia.exe
 119608	   2120	 653556	 775284	  bd474	ticker.exe
 116816	   2120	 653556	 772492	  bc98c	unlimited.exe
 600620	  51906	 653156	1305682	 13ec52	cxx_iostream.exe
 236212	   8532	 653452	 898196	  db494	cdtest.exe
 231016	   2584	 653092	 886692	  d87a4	capture.exe

For the mpc5668g BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 128156	   2168	 260264	 390588	  5f5bc	base_sp.exe
 142840	   2060	 260316	 405216	  62ee0	hello.exe
  87009	   1776	 260496	 349281	  55461	minimum.exe
 652191	   6150	 256308	 914649	  df4d9	fileio.exe
 152818	   2264	 260180	 415262	  6561e	nsecs.exe
 220116	   2544	 259900	 482560	  75d00	paranoia.exe
 131484	   2176	 260264	 393924	  602c4	ticker.exe
 130856	   2192	 260260	 393308	  6005c	unlimited.exe
 940632	 148002	 259608	1348242	 149292	cxx_iostream.exe
 246880	   9356	 259724	 515960	  7df78	cdtest.exe
 245556	   2672	 259776	 508004	  7c064	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 113552	   2136	 260308	 375996	  5bcbc	base_sp.exe
 125820	   1996	 260352	 388168	  5ec48	hello.exe
  50384	   1504	 260768	 312656	  4c550	minimum.exe
 625735	   6122	 256328	 888185	  d8d79	fileio.exe
 138942	   2232	 260224	 401398	  61ff6	nsecs.exe
 204760	   2520	 259932	 467212	  7210c	paranoia.exe
 117168	   2144	 260308	 379620	  5cae4	ticker.exe
 114536	   2152	 260296	 376984	  5c098	unlimited.exe
 598928	  51194	 259908	 910030	  de2ce	cxx_iostream.exe
 233264	   8032	 260184	 501480	  7a6e8	cdtest.exe
 228300	   2608	 259852	 490760	  77d08	capture.exe

For the mpc5674f_ecu508_app BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 131220	   2176	 714916	 848312	  cf1b8	base_sp.exe
 145804	   2068	 714968	 862840	  d2a78	hello.exe
  89393	   1784	 715152	 806329	  c4db9	minimum.exe
 655739	   6166	 710928	1372833	 14f2a1	fileio.exe
 156170	   2272	 714828	 873270	  d5336	nsecs.exe
 227760	   2560	 714552	 944872	  e6ae8	paranoia.exe
 134548	   2184	 714916	 851648	  cfec0	ticker.exe
 133792	   2208	 714912	 850912	  cfbe0	unlimited.exe
 943340	 151774	 714268	1809382	 1b9be6	cxx_iostream.exe
 250420	   9888	 714376	 974684	  edf5c	cdtest.exe
 248832	   2680	 714428	 965940	  ebd34	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 115512	   2152	 714960	 832624	  cb470	base_sp.exe
 127680	   2012	 715004	 844696	  ce398	hello.exe
  51680	   1512	 715424	 768616	  bba68	minimum.exe
 628275	   6130	 710980	1345385	 148769	fileio.exe
 141222	   2248	 714872	 858342	  d18e6	nsecs.exe
 211332	   2528	 714584	 928444	  e2abc	paranoia.exe
 119128	   2160	 714960	 836248	  cc298	ticker.exe
 116336	   2160	 714948	 833444	  cb7a4	unlimited.exe
 600140	  51946	 714568	1366654	 14da7e	cxx_iostream.exe
 235700	   8572	 714836	 959108	  ea284	cdtest.exe
 230536	   2624	 714472	 947632	  e75b0	capture.exe

For the mpc5674fevb BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 131056	   2176	 784548	 917780	  e0114	base_sp.exe
 145640	   2068	 784600	 932308	  e39d4	hello.exe
  89781	   1784	 784784	 876349	  d5f3d	minimum.exe
 655122	   6166	 780560	1441848	 160038	fileio.exe
 155718	   2272	 784460	 942450	  e6172	nsecs.exe
 223020	   2560	 784184	1009764	  f6864	paranoia.exe
 134384	   2184	 784548	 921116	  e0e1c	ticker.exe
 133660	   2208	 784544	 920412	  e0b5c	unlimited.exe
 943408	 148018	 783900	1875326	 1c9d7e	cxx_iostream.exe
 249816	   9364	 784008	1043188	  feaf4	cdtest.exe
 248420	   2680	 784060	1035160	  fcb98	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 115348	   2152	 784592	 902092	  dc3cc	base_sp.exe
 127452	   2012	 784636	 914100	  df2b4	hello.exe
  52020	   1512	 785056	 838588	  ccbbc	minimum.exe
 627538	   6130	 780612	1414280	 159488	fileio.exe
 140738	   2248	 784504	 927490	  e2702	nsecs.exe
 206552	   2528	 784216	 993296	  f2810	paranoia.exe
 118964	   2160	 784592	 905716	  dd1f4	ticker.exe
 116172	   2160	 784580	 902912	  dc700	unlimited.exe
 600560	  51210	 784200	1435970	 15e942	cxx_iostream.exe
 235056	   8048	 784468	1027572	  fadf4	cdtest.exe
 230092	   2624	 784104	1016820	  f83f4	capture.exe

For the mpc5674fevb_spe BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 132120	   2176	 784548	 918844	  e053c	base_sp.exe
 146736	   2068	 784600	 933404	  e3e1c	hello.exe
  90325	   1784	 784784	 876893	  d615d	minimum.exe
 656667	   6166	 780560	1443393	 160641	fileio.exe
 157070	   2272	 784460	 943802	  e66ba	nsecs.exe
 228660	   2560	 784184	1015404	  f7e6c	paranoia.exe
 135448	   2184	 784548	 922180	  e1244	ticker.exe
 134692	   2208	 784544	 921444	  e0f64	unlimited.exe
 944240	 151774	 783900	1879914	 1caf6a	cxx_iostream.exe
 251320	   9888	 784008	1045216	  ff2e0	cdtest.exe
 249732	   2680	 784060	1036472	  fd0b8	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 116412	   2152	 784592	 903156	  dc7f4	base_sp.exe
 128580	   2012	 784636	 915228	  df71c	hello.exe
  52580	   1512	 785056	 839148	  ccdec	minimum.exe
 629171	   6130	 780612	1415913	 159ae9	fileio.exe
 142122	   2248	 784504	 928874	  e2c6a	nsecs.exe
 212232	   2528	 784216	 998976	  f3e40	paranoia.exe
 120028	   2160	 784592	 906780	  dd61c	ticker.exe
 117236	   2160	 784580	 903976	  dcb28	unlimited.exe
 601040	  51946	 784200	1437186	 15ee02	cxx_iostream.exe
 236600	   8572	 784468	1029640	  fb608	cdtest.exe
 231436	   2624	 784104	1018164	  f8934	capture.exe

For the phycore_mpc5554 BSP variant:

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 131356	   2136	4258020	4391512	 430258	base_sp.exe
 145972	   2028	4258044	4406044	 433b1c	hello.exe
  89561	   1744	4258252	4349557	 425e75	minimum.exe
 655903	   6126	4254028	4916057	 4b0359	fileio.exe
 156338	   2232	4257928	4416498	 4363f2	nsecs.exe
 227928	   2520	4257636	4488084	 447b94	paranoia.exe
 134716	   2144	4258012	4394872	 430f78	ticker.exe
 133960	   2168	4257988	4394116	 430c84	unlimited.exe
 943508	 151734	4257340	5352582	 51ac86	cxx_iostream.exe
 250588	   9848	4257452	4517888	 44f000	cdtest.exe
 249000	   2640	4257516	4509156	 44cde4	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 115776	   2112	4258044	4375932	 42c57c	base_sp.exe
 127944	   1972	4258100	4388016	 42f4b0	hello.exe
  51944	   1472	4258524	4311940	 41cb84	minimum.exe
 628535	   6090	4254060	4888685	 4a986d	fileio.exe
 141486	   2208	4257952	4401646	 4329ee	nsecs.exe
 211596	   2488	4257668	4471752	 443bc8	paranoia.exe
 119392	   2120	4258036	4379548	 42d39c	ticker.exe
 116600	   2120	4258036	4376756	 42c8b4	unlimited.exe
 600404	  51906	4257636	4909946	 4aeb7a	cxx_iostream.exe
 235964	   8532	4257932	4502428	 44b39c	cdtest.exe
 230800	   2584	4257572	4490956	 4486cc	capture.exe

---

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

diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/make/custom/mpc55xx.inc b/c/src/lib/libbsp/powerpc/mpc55xxevb/make/custom/mpc55xx.inc
index 3595490..262f206 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/make/custom/mpc55xx.inc
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/make/custom/mpc55xx.inc
@@ -20,3 +20,6 @@ CPU_CFLAGS = -mcpu=8540 -meabi -msdata=sysv -fno-common $(CPU_CFLAGS_FLOAT) \
     -D__ppc_generic -mstrict-align
 
 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