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

Joel Sherrill joel at rtems.org
Sat Jan 23 03:17:17 UTC 2016


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

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

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

The size of the sample executables without this option were:

   text    data     bss     dec     hex filename
  79664    1600   40336  121600   1db00 base_sp.exe
  88960    1584   39920  130464   1fda0 hello.exe
  36464    1184   36672   74320   12250 minimum.exe
 523792    5520   51824  581136   8de10 fileio.exe
  98784    1696   40448  140928   22680 nsecs.exe
 146688    1984   40928  189600   2e4a0 paranoia.exe
  83984    1616   40368  125968   1ec10 ticker.exe
  82336    1632   43776  127744   1f300 unlimited.exe
 827968   21408   47408  896784   daf10 cxx_iostream.exe
 178784    2032   40480  221296   36070 cdtest.exe
 173040    2112   42160  217312   350e0 capture.exe

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

   text	   data	    bss	    dec	    hex	filename
  72832	   1584	  40272	 114688	  1c000	base_sp.exe
  81152	   1536	  39856	 122544	  1deb0	hello.exe
  29744	   1152	  36624	  67520	  107c0	minimum.exe
 508448	   5504	  51488	 565440	  8a0c0	fileio.exe
  92992	   1680	  40384	 135056	  20f90	nsecs.exe
 139472	   1952	  40864	 182288	  2c810	paranoia.exe
  77872	   1600	  40304	 119776	  1d3e0	ticker.exe
  74848	   1600	  43696	 120144	  1d550	unlimited.exe
 156192	   2048	  40128	 198368	  306e0	cxx_iostream.exe
 163984	   1984	  40384	 206352	  32610	cdtest.exe
 164096	   2064	  42096	 208256	  32d80	capture.exe

---

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

diff --git a/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg b/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg
index 3eaade8..d8c687c 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg
+++ b/c/src/lib/libbsp/m68k/mvme147s/make/custom/mvme147s.cfg
@@ -13,6 +13,9 @@ CPU_CFLAGS = -mcpu=68030
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
 
 define bsp-post-link
 	$(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec




More information about the vc mailing list