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

Joel Sherrill joel at rtems.org
Sat Jan 23 02:25:41 UTC 2016


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

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

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

The size of the sample executables without this option were:

   text    data     bss     dec     hex filename
 142464    1648   12112  156224   26240 base_sp.exe
 149936    1616   11712  163264   27dc0 hello.exe
  78896    1184    8048   88128   15840 minimum.exe
 591504    5552   23600  620656   97870 fileio.exe
 161440    1728   12224  175392   2ad20 nsecs.exe
 210240    2016   12720  224976   36ed0 paranoia.exe
 146256    1648   12144  160048   27130 ticker.exe
 144464    1664   15552  161680   27790 unlimited.exe
 898944   21440   19200  939584   e5640 cxx_iostream.exe
 241824    2064   12256  256144   3e890 cdtest.exe
 236368    2144   13936  252448   3da20 capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 134224	   1600	  12064	 147888	  241b0	base_sp.exe
 140768	   1552	  11648	 153968	  25970	hello.exe
  70592	   1152	   7984	  79728	  13770	minimum.exe
 574528	   5504	  23264	 603296	  934a0	fileio.exe
 154256	   1696	  12160	 168112	  290b0	nsecs.exe
 201504	   1984	  12656	 216144	  34c50	paranoia.exe
 138752	   1600	  12096	 152448	  25380	ticker.exe
 135600	   1616	  15488	 152704	  25480	unlimited.exe
 218080	   2064	  11904	 232048	  38a70	cxx_iostream.exe
 225776	   2000	  12176	 239952	  3a950	cdtest.exe
 225952	   2080	  13888	 241920	  3b100	capture.exe

---

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

diff --git a/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg b/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg
index 21bd9af..56ef084 100644
--- a/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg
+++ b/c/src/lib/libbsp/m68k/mvme167/make/custom/mvme167.cfg
@@ -20,6 +20,9 @@ CPU_CFLAGS = -mcpu=68040
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fno-omit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
 
 # We use TFTP to transfer files to the MVME167. We generate binary files
 # rather than S-records. We skip the header during downloads.




More information about the vc mailing list