[rtems commit] m68k/gen68340: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 02:44:09 UTC 2016
Module: rtems
Branch: master
Commit: 005fc1a5ba7f4121448d2a197a5902751097d71c
Changeset: http://git.rtems.org/rtems/commit/?id=005fc1a5ba7f4121448d2a197a5902751097d71c
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:34 2016 +0000
m68k/gen68340: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
97296 5088 21408 123792 1e390 base_sp.exe
110720 5056 21008 136784 21650 hello.exe
34240 4512 17296 56048 daf0 minimum.exe
543344 8992 32896 585232 8ee10 fileio.exe
116304 5168 21520 142992 22e90 nsecs.exe
194352 5456 22000 221808 36270 paranoia.exe
101152 5088 21440 127680 1f2c0 ticker.exe
99472 5120 24848 129440 1f9a0 unlimited.exe
847312 24960 28512 900784 dbeb0 cxx_iostream.exe
200672 5680 21584 227936 37a60 cdtest.exe
193312 5584 23232 222128 363b0 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
89376 5056 21360 115792 1c450 base_sp.exe
101872 5008 20944 127824 1f350 hello.exe
27584 4464 17232 49280 c080 minimum.exe
527520 8960 32560 569040 8aed0 fileio.exe
109424 5136 21456 136016 21350 nsecs.exe
185984 5424 21952 213360 34170 paranoia.exe
93968 5056 21376 120400 1d650 ticker.exe
90944 5072 24784 120800 1d7e0 unlimited.exe
176832 5600 21248 203680 31ba0 cxx_iostream.exe
184480 5536 21504 211520 33a40 cdtest.exe
183376 5520 23168 212064 33c60 capture.exe
---
c/src/lib/libbsp/m68k/gen68340/make/custom/gen68340.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/m68k/gen68340/make/custom/gen68340.cfg b/c/src/lib/libbsp/m68k/gen68340/make/custom/gen68340.cfg
index 5b6c40b..18eda2b 100644
--- a/c/src/lib/libbsp/m68k/gen68340/make/custom/gen68340.cfg
+++ b/c/src/lib/libbsp/m68k/gen68340/make/custom/gen68340.cfg
@@ -13,3 +13,6 @@ CPU_CFLAGS = -mcpu=cpu32
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
More information about the vc
mailing list