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

Joel Sherrill joel at rtems.org
Sat Nov 24 22:57:09 UTC 2018


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

Author:    pritishjain <pritishjain2001 at gmail.com>
Date:      Sun Nov 25 02:43:07 2018 +0530

m68k/gen68340:Add per-section compilation and linking support

The size of the sample executables without this option were:

  65600    4384   19280   89264   15cb0 ./m68k-rtems5/c/gen68340/testsuites/samples/base_sp.exe
 199728    5504   22688  227920   37a50 ./m68k-rtems5/c/gen68340/testsuites/samples/capture.exe
 233024    6160   20288  259472   3f590 ./m68k-rtems5/c/gen68340/testsuites/samples/cdtest.exe
 829632   25152   27008  881792   d7480 ./m68k-rtems5/c/gen68340/testsuites/samples/cxx_iostream.exe
 539072    8048   32144  579264   8d6c0 ./m68k-rtems5/c/gen68340/testsuites/samples/fileio.exe
 100320    4752   19440  124512   1e660 ./m68k-rtems5/c/gen68340/testsuites/samples/hello.exe
 240080    9264   26048  275392   433c0 ./m68k-rtems5/c/gen68340/testsuites/samples/loopback.exe
  36784    3584   15152   55520    d8e0 ./m68k-rtems5/c/gen68340/testsuites/samples/minimum.exe
  89104    4864   19408  113376   1bae0 ./m68k-rtems5/c/gen68340/testsuites/samples/nsecs.exe
 175200    5152   20016  200368   30eb0 ./m68k-rtems5/c/gen68340/testsuites/samples/paranoia.exe
 422944   15456   49312  487712   77120 ./m68k-rtems5/c/gen68340/testsuites/samples/pppd.exe
  68768    4416   19312   92496   16950 ./m68k-rtems5/c/gen68340/testsuites/samples/ticker.exe
  68816    4368   23200   96384   17880 ./m68k-rtems5/c/gen68340/testsuites/samples/unlimited.exe

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

   text    data     bss     dec     hex filename
  54384    4384   19200   77968   13090 ./m68k-rtems5/c/gen68340/testsuites/samples/base_sp.exe
 177648    5488   22640  205776   323d0 ./m68k-rtems5/c/gen68340/testsuites/samples/capture.exe
 159392    5344   20208  184944   2d270 ./m68k-rtems5/c/gen68340/testsuites/samples/cdtest.exe
 158720    5424   20432  184576   2d100 ./m68k-rtems5/c/gen68340/testsuites/samples/cxx_iostream.exe
 515696    8016   31792  555504   879f0 ./m68k-rtems5/c/gen68340/testsuites/samples/fileio.exe
  83920    4736   19392  108048   1a610 ./m68k-rtems5/c/gen68340/testsuites/samples/hello.exe
 206640    9168   25920  241728   3b040 ./m68k-rtems5/c/gen68340/testsuites/samples/loopback.exe
  21232    3520   15104   39856    9bb0 ./m68k-rtems5/c/gen68340/testsuites/samples/minimum.exe
  78352    4864   19312  102528   19080 ./m68k-rtems5/c/gen68340/testsuites/samples/nsecs.exe
 159600    5136   19968  184704   2d180 ./m68k-rtems5/c/gen68340/testsuites/samples/paranoia.exe
 377376   15296   48528  441200   6bb70 ./m68k-rtems5/c/gen68340/testsuites/samples/pppd.exe
  58304    4416   19232   81952   14020 ./m68k-rtems5/c/gen68340/testsuites/samples/ticker.exe
  59360    4336   23168   86864   15350 ./m68k-rtems5/c/gen68340/testsuites/samples/unlimited.exe

Closes #2573.

---

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

diff --git a/bsps/m68k/gen68340/config/gen68340.cfg b/bsps/m68k/gen68340/config/gen68340.cfg
index 5185e2c..54fa7bc 100644
--- a/bsps/m68k/gen68340/config/gen68340.cfg
+++ b/bsps/m68k/gen68340/config/gen68340.cfg
@@ -1,4 +1,4 @@
-# 
+#
 #  Config file for a "generic 68340" BSP
 
 RTEMS_CPU=m68k
@@ -14,5 +14,5 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
 
 # FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2573.
 # 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