[rtems commit] bfin/eZKit533: Add per-section compilation and linking support

Joel Sherrill joel at rtems.org
Fri Mar 11 20:14:54 UTC 2016


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

Author:    Joel Sherrill <joel at rtems.org>
Date:      Thu Mar 10 14:21:40 2016 -0600

bfin/eZKit533: Add per-section compilation and linking support

updates #2577.

For the eZKit533 BSP variant without this option sample executables
sizes were as follows:

   text	   data	    bss	    	  dec	    	  hex	filename
  75160	   1628	   9224	  86012	  14ffc	ticker.exe
  49156	   1388	   5964	  56508	   dcbc	minimum.exe
 475080	   5708	  22440	 503228	  7adbc	fileio.exe
 369432	  12224	  38436	 420092	  668fc	pppd.exe
 162344	   2284	  12136	 176764	  2b27c	capture.exe
  90168	   1716	   9296	 101180	  18b3c	nsecs.exe
 152840	   2000	   9828	 164668	  2833c	paranoia.exe
  74168	   1628	   9192	  84988	  14bfc	base_sp.exe
  76520	   1656	  13020	  91196	  1643c	unlimited.exe
  87976	   1600	   9172	  98748	  181bc	hello.exe
 222716	   6116	  16540	 245372	  3be7c	loopback.exe

For the eZKit533 BSP variant with this option sample executables
sizes were as follows:

   text	   data	    bss	    	  dec	    	  hex	filename
  68400	   1590	   9220	  79210	  1356a	ticker.exe
  28220	   1265	   5700	  35185	   8971	minimum.exe
 458108	   5670	  22178	 485956	  76a44	fileio.exe
 331040	   8892	  37588	 377520	  5c2b0	pppd.exe
 151020	   2214	  12091	 165325	  285cd	capture.exe
  83172	   1678	   9304	  94154	  16fca	nsecs.exe
 143360	   1958	   9804	 155122	  25df2	paranoia.exe
  65208	   1586	   9216	  76010	  128ea	base_sp.exe
  66952	   1606	  13032	  81590	  13eb6	unlimited.exe
  78016	   1538	   9196	  88750	  15aae	hello.exe
 195396	   2834	  16368	 214598	  34646	loopback.exe

---

 c/src/lib/libbsp/bfin/eZKit533/make/custom/eZKit533.cfg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/c/src/lib/libbsp/bfin/eZKit533/make/custom/eZKit533.cfg b/c/src/lib/libbsp/bfin/eZKit533/make/custom/eZKit533.cfg
index 4fe7d69..ada3c32 100644
--- a/c/src/lib/libbsp/bfin/eZKit533/make/custom/eZKit533.cfg
+++ b/c/src/lib/libbsp/bfin/eZKit533/make/custom/eZKit533.cfg
@@ -14,3 +14,6 @@ CPU_CFLAGS =
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections



More information about the vc mailing list