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

Joel Sherrill joel at rtems.org
Thu Nov 29 19:02:27 UTC 2018


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

Author:    Shashvat Jain <shashvatjain2002 at gmail.com>
Date:      Thu Nov 29 13:32:46 2018 -0500

m68k/mcf5206elite: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
  70704	   1104	  11008	  82816	  14380	./base_sp.exe
 202640	   2096	  14288	 219024	  35790	./capture.exe
 240416	   2864	  12016	 255296	  3e540	./cdtest.exe
 851024	  21840	  18736	 891600	  d9ad0	./cxx_iostream.exe
 570560	   4640	  23760	 598960	  923b0	./fileio.exe
 104928	   1456	  11168	 117552	  1cb30	./hello.exe
 249904	   5968	  17776	 273648	  42cf0	./loopback.exe
  38304	    288	   6864	  45456	   b190	./minimum.exe
  94416	   1584	  11136	 107136	  1a280	./nsecs.exe
 179728	   1856	  11744	 193328	  2f330	./paranoia.exe
 435296	  12048	  40912	 488256	  77340	./pppd.exe
  73856	   1120	  11040	  86016	  15000	./ticker.exe
  74048	   1072	  14928	  90048	  15fc0	./unlimited.exe

The size of the sample executables with this option were:

   text	   data	    bss	    dec	    hex	filename
 172384	   2176	  12160	 186720	  2d960	./cxx_iostream.exe
 558320	   4608	  23440	 586368	  8f280	./fileio.exe
  96256	   1456	  11136	 108848	  1a930	./hello.exe
 234144	   5968	  17712	 257824	  3ef20	./loopback.exe
  37648	    288	   6832	  44768	   aee0	./minimum.exe
  88560	   1568	  11056	 101184	  18b40	./nsecs.exe
 171360	   1856	  11712	 184928	  2d260	./paranoia.exe
 422992	  12032	  40848	 475872	  742e0	./pppd.exe
  69120	   1120	  10960	  81200	  13d30	./ticker.exe
  72464	   1072	  14896	  88432	  15970	./unlimited.exe
  66256	   1088	  10928	  78272	  131c0	./base_sp.exe
 189296	   2096	  14256	 205648	  32350	./capture.exe
 172272	   2096	  11968	 186336	  2d7e0	./cdtest.exe

Closes #2572

---

 bsps/m68k/mcf5206elite/config/mcf5206elite.cfg | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/bsps/m68k/mcf5206elite/config/mcf5206elite.cfg b/bsps/m68k/mcf5206elite/config/mcf5206elite.cfg
index 258727b..079e492 100644
--- a/bsps/m68k/mcf5206elite/config/mcf5206elite.cfg
+++ b/bsps/m68k/mcf5206elite/config/mcf5206elite.cfg
@@ -15,7 +15,6 @@ CPU_CFLAGS = -mcpu=5206
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
 
-# FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2572.
 # 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




More information about the vc mailing list