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

Joel Sherrill joel at rtems.org
Tue Nov 27 15:26:23 UTC 2018


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

Author:    Shashvat Jain <shashvatjain2002 at gmail.com>
Date:      Tue Nov 27 08:17:49 2018 +0530

m68k/av5282: 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
  83168    1152   11904   96224   177e0 base_sp.exe
 199184    2096   14848  216128   34c40 capture.exe
 252496    2912   12912  268320   41820 cdtest.exe
 861872   21888   19648  903408   dc8f0 cxx_iostream.exe
 564816    4640   24304  593760   90f60 fileio.exe
 117168    1504   12048  130720   1fea0 hello.exe
 261216    6016   18688  285920   45ce0 loopback.exe
  67200    1008    8768   76976   12cb0 minimum.exe
 106336    1632   12016  119984   1d4b0 nsecs.exe
 191856    1904   12624  206384   32630 paranoia.exe
 430224   12048   41472  483744   761a0 pppd.exe
  85920    1168   11936   99024   182d0 ticker.exe
  85984    1120   15808  102912   19200 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
 185584    2096   14800  202480   316f0 capture.exe
 184192    2144   12864  199200   30a20 cdtest.exe
 184384    2224   13072  199680   30c00 cxx_iostream.exe
 552288    4624   23984  580896   8dd20 fileio.exe
 108224    1504   12016  121744   1db90 hello.exe
 245168    6016   18608  269792   41de0 loopback.exe
  62416    1008    8688   72112   119b0 minimum.exe
 100256    1616   11936  113808   1bc90 nsecs.exe
 183216    1904   12592  197712   30450 paranoia.exe
 417648   12048   41392  471088   73030 pppd.exe
  81024    1168   11856   94048   16f60 ticker.exe
  84176    1120   15776  101072   18ad0 unlimited.exe

Closes #2574

---

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

diff --git a/bsps/m68k/av5282/config/av5282.cfg b/bsps/m68k/av5282/config/av5282.cfg
index 1c82a4d..4a407b5 100644
--- a/bsps/m68k/av5282/config/av5282.cfg
+++ b/bsps/m68k/av5282/config/av5282.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=528x
 
 
@@ -16,8 +16,8 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
 
 # FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2574.
 # 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