[rtems commit] m68k/mcf5206elite: Add per-section compilation and linking support.

Joel Sherrill joel at rtems.org
Sat Jan 23 02:52:51 UTC 2016


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

Author:    Ralph Holmes <ralph at ybden.com>
Date:      Sat Jan 23 02:07:35 2016 +0000

m68k/mcf5206elite: Add per-section compilation and linking support.

The size of the sample executables without this option were:

   text    data     bss     dec     hex filename
  95264    1680    8928  105872   19d90 base_sp.exe
 109184    1648    8512  119344   1d230 hello.exe
  32608    1216    4912   38736    9750 minimum.exe
 575040    5584   20400  601024   92bc0 fileio.exe
 114528    1760    9024  125312   1e980 nsecs.exe
 194864    2048    9520  206432   32660 paranoia.exe
  99120    1680    8944  109744   1acb0 ticker.exe
  97520    1712   12352  111584   1b3e0 unlimited.exe
 869136   21920   16016  907072   dd740 cxx_iostream.exe
 203264    2256    9104  214624   34660 cdtest.exe
 197120    2176   10752  210048   33480 capture.exe

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

   text	   data	    bss	    dec	    hex	filename
  86768	   1632	   8864	  97264	  17bf0	base_sp.exe
  99776	   1584	   8448	 109808	  1acf0	hello.exe
  23808	   1168	   4864	  29840	   7490	minimum.exe
 557808	   5552	  20080	 583440	  8e710	fileio.exe
 107168	   1728	   8976	 117872	  1cc70	nsecs.exe
 186032	   2016	   9456	 197504	  30380	paranoia.exe
  91408	   1632	   8896	 101936	  18e30	ticker.exe
  88336	   1648	  12288	 102272	  18f80	unlimited.exe
 178768	   2192	   8752	 189712	  2e510	cxx_iostream.exe
 186528	   2128	   9008	 197664	  30420	cdtest.exe
 186640	   2112	  10688	 199440	  30b10	capture.exe

---

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

diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/make/custom/mcf5206elite.cfg b/c/src/lib/libbsp/m68k/mcf5206elite/make/custom/mcf5206elite.cfg
index 7d48dab..b150e04 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/make/custom/mcf5206elite.cfg
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/make/custom/mcf5206elite.cfg
@@ -15,3 +15,6 @@ CPU_CFLAGS = -mcpu=5206
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections




More information about the vc mailing list