[rtems commit] bfin/TLL6527M: 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:    74ad76a3abd114af47b8da59ca059fa47cc02cf5
Changeset: http://git.rtems.org/rtems/commit/?id=74ad76a3abd114af47b8da59ca059fa47cc02cf5

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

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

updates #2577.

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

   text	   data	    bss	    	  dec	    	  hex	filename
  74696	   1660	  71544	 147900	  241bc	ticker.exe
  48756	   1420	  68348	 118524	  1cefc	minimum.exe
 474520	   5740	  84792	 565052	  89f3c	fileio.exe
 368744	  12256	 100788	 481788	  759fc	pppd.exe
 161848	   2316	  74488	 238652	  3a43c	capture.exe
  89704	   1748	  71680	 163132	  27d3c	nsecs.exe
 152376	   2032	  72148	 226556	  374fc	paranoia.exe
  73704	   1660	  71512	 146876	  23dbc	base_sp.exe
  76120	   1688	  75404	 153212	  2567c	unlimited.exe
  87576	   1632	  71556	 160764	  273fc	hello.exe
 222172	   6148	  78876	 307196	  4affc	loopback.exe

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

   text	   data	    bss	    	  dec	    	  hex	filename
  68760	   1622	  71552	 141934	  22a6e	ticker.exe
  28332	   1265	  68048	  97645	  17d6d	minimum.exe
 458400	   5702	  84514	 548616	  85f08	fileio.exe
 331196	   8924	  99932	 440052	  6b6f4	pppd.exe
 151356	   2246	  74447	 228049	  37ad1	capture.exe
  83528	   1710	  71640	 156878	  264ce	nsecs.exe
 143724	   1990	  72132	 217846	  352f6	paranoia.exe
  65572	   1618	  71544	 138734	  21dee	base_sp.exe
  67368	   1638	  75372	 144378	  233fa	unlimited.exe
  78444	   1570	  71524	 151538	  24ff2	hello.exe
 195680	   2866	  78712	 277258	  43b0a	loopback.exe

---

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

diff --git a/c/src/lib/libbsp/bfin/TLL6527M/make/custom/TLL6527M.cfg b/c/src/lib/libbsp/bfin/TLL6527M/make/custom/TLL6527M.cfg
index a7cef14..56aaecb 100644
--- a/c/src/lib/libbsp/bfin/TLL6527M/make/custom/TLL6527M.cfg
+++ b/c/src/lib/libbsp/bfin/TLL6527M/make/custom/TLL6527M.cfg
@@ -15,3 +15,6 @@ CPU_CFLAGS =-mcpu=bf527
 # optimize flag: typically -O2
 # gcc-4.2.0 segfaults on -OX > -O0
 CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections



More information about the vc mailing list