[rtems commit] bfin/bf537Stamp: Add per-section compilation and linking support
Joel Sherrill
joel at rtems.org
Fri Mar 11 20:14:54 UTC 2016
Module: rtems
Branch: master
Commit: 32a4aea5bd88b759cc3ec4ce23ebd7e479b1f702
Changeset: http://git.rtems.org/rtems/commit/?id=32a4aea5bd88b759cc3ec4ce23ebd7e479b1f702
Author: Joel Sherrill <joel at rtems.org>
Date: Thu Mar 10 14:25:36 2016 -0600
bfin/bf537Stamp: Add per-section compilation and linking support
updates #2577.
For the bf537Stamp BSP variant without this option sample
executables sizes were as follows:
text data bss dec hex filename
75672 1884 9224 86780 152fc ticker.exe
49668 1644 5964 57276 dfbc minimum.exe
474936 5964 22456 503356 7ae3c fileio.exe
369944 12480 38436 420860 66bfc pppd.exe
162856 2540 12136 177532 2b57c capture.exe
90696 1972 9280 101948 18e3c nsecs.exe
153352 2256 9828 165436 2863c paranoia.exe
74680 1884 9192 85756 14efc base_sp.exe
77048 1912 13068 92028 1677c unlimited.exe
88504 1856 9220 99580 184fc hello.exe
223228 6372 16540 246140 3c17c loopback.exe
For the bf537Stamp BSP variant with this option sample executables
sizes were as follows:
text data bss dec hex filename
68524 1846 9224 79594 136ea ticker.exe
28348 1521 5700 35569 8af1 minimum.exe
458232 5926 22182 486340 76bc4 fileio.exe
331164 9148 37592 377904 5c430 pppd.exe
151144 2470 12095 165709 2874d capture.exe
83296 1934 9308 94538 1714a nsecs.exe
143484 2214 9808 155506 25f72 paranoia.exe
65332 1842 9156 76330 12a2a base_sp.exe
67080 1862 13032 81974 14036 unlimited.exe
78144 1794 9196 89134 15c2e hello.exe
195520 3090 16372 214982 347c6 loopback.exe
---
c/src/lib/libbsp/bfin/bf537Stamp/make/custom/bf537Stamp.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/make/custom/bf537Stamp.cfg b/c/src/lib/libbsp/bfin/bf537Stamp/make/custom/bf537Stamp.cfg
index daa6a55..d533ca4 100644
--- a/c/src/lib/libbsp/bfin/bf537Stamp/make/custom/bf537Stamp.cfg
+++ b/c/src/lib/libbsp/bfin/bf537Stamp/make/custom/bf537Stamp.cfg
@@ -14,3 +14,6 @@ CPU_CFLAGS =
# optimize flag: typically -O2
# gcc-4.2.0 segfaults on -OX > -O0
CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
More information about the vc
mailing list