[rtems commit] powerpc/tqm8xx: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 20:55:46 UTC 2016
Module: rtems
Branch: master
Commit: 0a9ee085a03978658d60e07babd1d6df7ece41c0
Changeset: http://git.rtems.org/rtems/commit/?id=0a9ee085a03978658d60e07babd1d6df7ece41c0
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 20:40:27 2016 +0000
powerpc/tqm8xx: Add per-section compilation and linking support.
For the pghplus BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
167168 2720 7776 177664 2b600 base_sp.exe
154336 2592 7712 164640 28320 hello.exe
146272 2528 4512 153312 256e0 minimum.exe
647904 6752 20032 674688 a4b80 fileio.exe
190656 2816 7872 201344 31280 nsecs.exe
230816 3104 8384 242304 3b280 paranoia.exe
170336 2752 7808 180896 2c2a0 ticker.exe
170624 2752 11552 184928 2d260 unlimited.exe
956800 156928 15424 1129152 113ac0 cxx_iostream.exe
268096 10656 8448 287200 461e0 cdtest.exe
248896 3232 9600 261728 3fe60 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
154080 2720 7744 164544 282c0 base_sp.exe
139040 2528 7680 149248 24700 hello.exe
46944 1824 3968 52736 ce00 minimum.exe
622016 6688 19712 648416 9e4e0 fileio.exe
178304 2816 7840 188960 2e220 nsecs.exe
217024 3104 8352 228480 37c80 paranoia.exe
157536 2720 7776 168032 29060 ticker.exe
156000 2720 11488 170208 298e0 unlimited.exe
611040 143808 14560 769408 bbd80 cxx_iostream.exe
254464 10144 8416 273024 42a80 cdtest.exe
232160 3200 9568 244928 3bcc0 capture.exe
For the tqm8xx_stk8xx variant:
The size of the sample executables without this option were:
text data bss dec hex filename
167168 2720 7776 177664 2b600 base_sp.exe
154336 2592 7712 164640 28320 hello.exe
146272 2528 4512 153312 256e0 minimum.exe
647904 6752 20032 674688 a4b80 fileio.exe
190656 2816 7872 201344 31280 nsecs.exe
230816 3104 8384 242304 3b280 paranoia.exe
170336 2752 7808 180896 2c2a0 ticker.exe
170624 2752 11552 184928 2d260 unlimited.exe
956800 156928 15424 1129152 113ac0 cxx_iostream.exe
268096 10656 8448 287200 461e0 cdtest.exe
248896 3232 9600 261728 3fe60 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
154080 2720 7744 164544 282c0 base_sp.exe
139040 2528 7680 149248 24700 hello.exe
46944 1824 3968 52736 ce00 minimum.exe
622016 6688 19712 648416 9e4e0 fileio.exe
178304 2816 7840 188960 2e220 nsecs.exe
217024 3104 8352 228480 37c80 paranoia.exe
157536 2720 7776 168032 29060 ticker.exe
156000 2720 11488 170208 298e0 unlimited.exe
611040 143808 14560 769408 bbd80 cxx_iostream.exe
254464 10144 8416 273024 42a80 cdtest.exe
232160 3200 9568 244928 3bcc0 capture.exe
---
c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc b/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc
index a932314..5bd08e3 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/make/custom/tqm8xx.inc
@@ -13,6 +13,9 @@ CPU_CFLAGS = -mcpu=860 -Dmpc860 \
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
define bsp-post-link
cp $(basename $@)$(EXEEXT) $(basename $@)$(DOWNEXT)
More information about the vc
mailing list