[rtems commit] arm/csb337: Add per-section compilation and linking support

Joel Sherrill joel at rtems.org
Sat Jan 9 18:15:00 UTC 2016


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

Author:    Aun-Ali Zaidi <admin at kodeit.net>
Date:      Sat Jan  9 11:53:50 2016 -0600

arm/csb337: Add per-section compilation and linking support

CSB337
======

The size of the sample executables without this option were:

   text	   data	  bss		dec		 hex	filename
  70556	   2168	15640608	15713332	 efc434	minimum.exe
 102324	   2428	15608576	15713328	 efc430	base_sp.exe
 122712	   2516	15588096	15713324	 efc42c	nsecs.exe
 201232	   2912	15509184	15713328	 efc430	capture.exe
 214608	   2456	15496256	15713320	 efc428	cdtest.exe
 190600	   2804	15519936	15713340	 efc43c	paranoia.exe
 115312	   2372	15595648	15713332	 efc434	hello.exe
 573592	   6340	15133408	15713340	 efc43c	fileio.exe
 105752	   2428	15605152	15713332	 efc434	ticker.exe
 281684	   7208	15424448	15713340	 efc43c	loopback.exe
 601632	   2640	15109056	15713328	 efc430	cxx_iostream.exe
 460224	  13324	15239776	15713324	 efc42c	pppd.exe
 104536	   2428	15606368	15713332	 efc434	unlimited.exe

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

   text	   data	  bss		dec		 hex	filename
  32396	   1404	15679520	15713320	 efc428	minimum.exe
  92036	   2268	15619040	15713344	 efc440	base_sp.exe
 112516	   2356	15598464	15713336	 efc438	nsecs.exe
 188792	   2744	15521792	15713328	 efc430	capture.exe
 202256	   2304	15508768	15713328	 efc430	cdtest.exe
 179664	   2644	15531008	15713316	 efc424	paranoia.exe
 102848	   2220	15608256	15713324	 efc42c	hello.exe
 552880	   6180	15154272	15713332	 efc434	fileio.exe
  95448	   2268	15615616	15713332	 efc434	ticker.exe
 257188	   6968	15449184	15713340	 efc43c	loopback.exe
 419444	   2488	15291392	15713324	 efc42c	cxx_iostream.exe
 422624	  13032	15277664	15713320	 efc428	pppd.exe
  92428	   2276	15618624	15713328	 efc430	unlimited.exe

CSB637
======

The size of the sample executables without this option were:

   text	   data	  bss		dec		hex	filename
  70556	   2168	65972256	66044980	3efc434	minimum.exe
 102324	   2428	65940224	66044976	3efc430	base_sp.exe
 122712	   2516	65919744	66044972	3efc42c	nsecs.exe
 201232	   2912	65840832	66044976	3efc430	capture.exe
 214608	   2456	65827904	66044968	3efc428	cdtest.exe
 190600	   2804	65851584	66044988	3efc43c	paranoia.exe
 115312	   2372	65927296	66044980	3efc434	hello.exe
 573592	   6340	65465056	66044988	3efc43c	fileio.exe
 105752	   2428	65936800	66044980	3efc434	ticker.exe
 281684	   7208	65756096	66044988	3efc43c	loopback.exe
 601632	   2640	65440704	66044976	3efc430	cxx_iostream.exe
 460224	  13324	65571424	66044972	3efc42c	pppd.exe
 104536	   2428	65938016	66044980	3efc434	unlimited.exe

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

   text	   data	  bss		dec		hex	filename
  32396	   1404	66011168	66044968	3efc428	minimum.exe
  92036	   2268	65950688	66044992	3efc440	base_sp.exe
 112516	   2356	65930112	66044984	3efc438	nsecs.exe
 188792	   2744	65853440	66044976	3efc430	capture.exe
 202256	   2304	65840416	66044976	3efc430	cdtest.exe
 179664	   2644	65862656	66044964	3efc424	paranoia.exe
 102848	   2220	65939904	66044972	3efc42c	hello.exe
 552880	   6180	65485920	66044980	3efc434	fileio.exe
  95448	   2268	65947264	66044980	3efc434	ticker.exe
 257188	   6968	65780832	66044988	3efc43c	loopback.exe
 419444	   2488	65623040	66044972	3efc42c	cxx_iostream.exe
 422624	  13032	65609312	66044968	3efc428	pppd.exe
  92428	   2276	65950272	66044976	3efc430	unlimited.exe

KIT637 V6
=========

The size of the sample executables without this option were:

   text	   data	  bss		dec		 hex	filename
  70556	   2168	15640608	15713332	 efc434	minimum.exe
 102324	   2428	15608576	15713328	 efc430	base_sp.exe
 122712	   2516	15588096	15713324	 efc42c	nsecs.exe
 201232	   2912	15509184	15713328	 efc430	capture.exe
 214608	   2456	15496256	15713320	 efc428	cdtest.exe
 190600	   2804	15519936	15713340	 efc43c	paranoia.exe
 115312	   2372	15595648	15713332	 efc434	hello.exe
 573596	   6340	15133408	15713344	 efc440	fileio.exe
 105752	   2428	15605152	15713332	 efc434	ticker.exe
 281684	   7208	15424448	15713340	 efc43c	loopback.exe
 601632	   2640	15109056	15713328	 efc430	cxx_iostream.exe
 460224	  13324	15239776	15713324	 efc42c	pppd.exe
 104536	   2428	15606368	15713332	 efc434	unlimited.exe

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

   text	   data	  bss		dec		 hex	filename
  32396	   1404	15679520	15713320	 efc428	minimum.exe
  92036	   2268	15619040	15713344	 efc440	base_sp.exe
 112516	   2356	15598464	15713336	 efc438	nsecs.exe
 188792	   2744	15521792	15713328	 efc430	capture.exe
 202256	   2304	15508768	15713328	 efc430	cdtest.exe
 179664	   2644	15531008	15713316	 efc424	paranoia.exe
 102848	   2220	15608256	15713324	 efc42c	hello.exe
 552884	   6180	15154272	15713336	 efc438	fileio.exe
  95448	   2268	15615616	15713332	 efc434	ticker.exe
 257188	   6968	15449184	15713340	 efc43c	loopback.exe
 419444	   2488	15291392	15713324	 efc42c	cxx_iostream.exe
 422624	  13032	15277664	15713320	 efc428	pppd.exe
  92428	   2276	15618624	15713328	 efc430	unlimited.exe

---

 c/src/lib/libbsp/arm/csb337/make/custom/csb337.cfg | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/c/src/lib/libbsp/arm/csb337/make/custom/csb337.cfg b/c/src/lib/libbsp/arm/csb337/make/custom/csb337.cfg
index 29dfaf7..a579c19 100644
--- a/c/src/lib/libbsp/arm/csb337/make/custom/csb337.cfg
+++ b/c/src/lib/libbsp/arm/csb337/make/custom/csb337.cfg
@@ -13,3 +13,7 @@ CPU_CFLAGS = -mcpu=arm920
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g 
+
+# Add CFLAGS and LDFLAGS for compiling and linking with per item sections
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+LDFLAGS            = -Wl,--gc-sections




More information about the vc mailing list