[rtems commit] m68k/mcf5235: Add per-section compilation and linking support (GCI 2018)

Joel Sherrill joel at rtems.org
Wed Nov 28 18:18:57 UTC 2018


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

Author:    Shashvat Jain <shashvatjain2002 at gmail.com>
Date:      Wed Nov 28 19:03:38 2018 +0530

m68k/mcf5235:Add per-section compilation and linking support (GCI 2018)

The size of the sample executables without this option were:

   text    data     bss     dec     hex filename
  83152    1152   11904   96208   177d0 base_sp.exe
 198784    2096   14848  215728   34ab0 capture.exe
 252496    2912   12912  268320   41820 cdtest.exe
 861744   21888   19648  903280   dc870 cxx_iostream.exe
 564768    4640   24304  593712   90f30 fileio.exe
 117184    1504   12048  130736   1feb0 hello.exe
 261024    6016   18688  285728   45c20 loopback.exe
  67232    1008    8768   77008   12cd0 minimum.exe
 106304    1632   12016  119952   1d490 nsecs.exe
 191840    1904   12624  206368   32620 paranoia.exe
 429824   12048   41472  483344   76010 pppd.exe
  85904    1168   11936   99008   182c0 ticker.exe
  86016    1120   15808  102944   19220 unlimited.exe

The size of the sample executables with this option were:

   text    data     bss     dec     hex filename
  78512    1136   11824   91472   16550 base_sp.exe
 185184    2096   14800  202080   31560 capture.exe
 184192    2144   12864  199200   30a20 cdtest.exe
 184416    2224   13072  199712   30c20 cxx_iostream.exe
 552240    4624   23984  580848   8dcf0 fileio.exe
 108256    1504   12016  121776   1dbb0 hello.exe
 245008    6016   18608  269632   41d40 loopback.exe
  62448    1008    8688   72144   119d0 minimum.exe
 100240    1616   11936  113792   1bc80 nsecs.exe
 183216    1904   12592  197712   30450 paranoia.exe
 417248   12048   41392  470688   72ea0 pppd.exe
  81024    1168   11856   94048   16f60 ticker.exe
  84208    1120   15776  101104   18af0 unlimited.exe

Closes #2571

---

 bsps/m68k/mcf5235/config/mcf5235.cfg | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bsps/m68k/mcf5235/config/mcf5235.cfg b/bsps/m68k/mcf5235/config/mcf5235.cfg
index aed4e2e..cf838b1 100644
--- a/bsps/m68k/mcf5235/config/mcf5235.cfg
+++ b/bsps/m68k/mcf5235/config/mcf5235.cfg
@@ -7,7 +7,7 @@ RTEMS_CPU=m68k
 include $(RTEMS_ROOT)/make/custom/default.cfg
 
 #  This contains the compiler options necessary to select the CPU model
-#  and (hopefully) optimize for it. 
+#  and (hopefully) optimize for it.
 CPU_CFLAGS = -mcpu=5235
 
 # optimize flag: typically -O2
@@ -15,8 +15,8 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
 
 # FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2571.
 # The following two lines enable compiling and linking on per element.
-# CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
-# LDFLAGS = -Wl,--gc-sections
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+LDFLAGS = -Wl,--gc-sections
 
 ifndef MTARGET
 MTARGET=ram



More information about the vc mailing list