[rtems commit] powerpc/mpc8260ads: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 19:09:51 UTC 2016
Module: rtems
Branch: master
Commit: 5adc3b63b0bb9f162a9d4b26646cf4c20e063f55
Changeset: http://git.rtems.org/rtems/commit/?id=5adc3b63b0bb9f162a9d4b26646cf4c20e063f55
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 18:21:11 2016 +0000
powerpc/mpc8260ads: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
163364 2976 139136 305476 4a944 base_sp.exe
150396 2936 139080 292412 4763c hello.exe
142316 2852 135864 281032 449c8 minimum.exe
650196 6950 151396 808542 c565e fileio.exe
188132 3068 139244 330444 50acc nsecs.exe
203636 3352 139724 346712 54a58 paranoia.exe
166660 2984 139168 308812 4b64c ticker.exe
166964 2992 142896 312852 4c614 unlimited.exe
1085764 23416 146796 1255976 132a28 cxx_iostream.exe
271560 3944 139788 415292 6563c cdtest.exe
245700 3480 140964 390144 5f400 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
134612 2936 139032 276580 43864 base_sp.exe
119380 2864 138968 261212 3fc5c hello.exe
42052 2416 135218 179686 2bde6 minimum.exe
610788 6908 151016 768712 bbac8 fileio.exe
160180 3032 139140 302352 49d10 nsecs.exe
174132 3312 139640 317084 4d69c paranoia.exe
138708 2948 139064 280720 44890 ticker.exe
137444 2936 142784 283164 4521c unlimited.exe
233580 2952 139432 375964 5bc9c cxx_iostream.exe
233796 3040 139252 376088 5bd18 cdtest.exe
215012 3412 140860 359284 57b74 capture.exe
---
c/src/lib/libbsp/powerpc/mpc8260ads/make/custom/mpc8260ads.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/make/custom/mpc8260ads.cfg b/c/src/lib/libbsp/powerpc/mpc8260ads/make/custom/mpc8260ads.cfg
index dbee576..71454b2 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/make/custom/mpc8260ads.cfg
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/make/custom/mpc8260ads.cfg
@@ -17,3 +17,6 @@ CPU_CFLAGS = -mcpu=603e -mstrict-align -Dmpc8260 \
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
More information about the vc
mailing list