[rtems commit] m68k/av5282: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 02:31:57 UTC 2016
Module: rtems
Branch: master
Commit: 27f460eae7c19d6ab678446d6bb565f806797d15
Changeset: http://git.rtems.org/rtems/commit/?id=27f460eae7c19d6ab678446d6bb565f806797d15
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 02:07:34 2016 +0000
m68k/av5282: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
92432 1680 9472 103584 194a0 base_sp.exe
106832 1648 9072 117552 1cb30 hello.exe
31728 1216 3888 36832 8fe0 minimum.exe
570368 5584 20960 596912 91bb0 fileio.exe
111232 1760 9584 122576 1ded0 nsecs.exe
191968 2048 10064 204080 31d30 paranoia.exe
96176 1680 9504 107360 1a360 ticker.exe
94672 1696 12912 109280 1aae0 unlimited.exe
865072 21936 16576 903584 dc9a0 cxx_iostream.exe
200400 2256 9648 212304 33d50 cdtest.exe
194128 2176 11296 207600 32af0 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
83360 1632 9408 94400 170c0 base_sp.exe
96816 1584 9008 107408 1a390 hello.exe
22976 1184 3840 28000 6d60 minimum.exe
552320 5552 20624 578496 8d3c0 fileio.exe
103296 1728 9520 114544 1bf70 nsecs.exe
182560 2016 10000 194576 2f810 paranoia.exe
87888 1648 9440 98976 182a0 ticker.exe
84880 1664 12848 99392 18440 unlimited.exe
175168 2192 9296 186656 2d920 cxx_iostream.exe
183088 2128 9568 194784 2f8e0 cdtest.exe
183056 2112 11232 196400 2ff30 capture.exe
---
c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg b/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg
index a668d99..1266401 100644
--- a/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg
+++ b/c/src/lib/libbsp/m68k/av5282/make/custom/av5282.cfg
@@ -14,6 +14,9 @@ CPU_CFLAGS = -mcpu=528x
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
ifndef MTARGET
MTARGET=ram
More information about the vc
mailing list