[rtems commit] powerpc/mbx8xx: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 20:52:32 UTC 2016
Module: rtems
Branch: master
Commit: 413cd7f68b641e36d00c8f28625557ef8e3247de
Changeset: http://git.rtems.org/rtems/commit/?id=413cd7f68b641e36d00c8f28625557ef8e3247de
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 19:46:19 2016 +0000
powerpc/mbx8xx: Add per-section compilation and linking support.
For the mbx821_001 BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
167592 2372 8044 178008 2b758 base_sp.exe
154624 2324 8032 164980 28474 hello.exe
146612 2228 4836 153676 2584c minimum.exe
656764 6480 20648 683892 a6f74 fileio.exe
191744 2464 8148 202356 31674 nsecs.exe
231636 2748 8640 243024 3b550 paranoia.exe
170792 2380 8076 181248 2c400 ticker.exe
170992 2372 11880 185244 2d39c unlimited.exe
1091572 22792 15336 1129700 113ce4 cxx_iostream.exe
275128 3340 8304 286772 46034 cdtest.exe
249888 2872 9836 262596 401c4 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
153280 2292 7956 163528 27ec8 base_sp.exe
137816 2212 7568 147596 2408c hello.exe
43296 1736 3876 48908 bf0c minimum.exe
630588 6396 20316 657300 a0794 fileio.exe
178944 2388 8060 189392 2e3d0 nsecs.exe
216596 2676 8604 227876 37a24 paranoia.exe
157536 2304 7988 167828 28f94 ticker.exe
154760 2292 11384 168436 291f4 unlimited.exe
251552 2868 8024 262444 4012c cxx_iostream.exe
251848 2764 8216 262828 402ac cdtest.exe
231896 2760 9780 244436 3bad4 capture.exe
For the mbx821_002 BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
167592 2372 8044 178008 2b758 base_sp.exe
154624 2324 8032 164980 28474 hello.exe
146612 2228 4836 153676 2584c minimum.exe
656764 6480 20648 683892 a6f74 fileio.exe
191744 2464 8148 202356 31674 nsecs.exe
231636 2748 8640 243024 3b550 paranoia.exe
170792 2380 8076 181248 2c400 ticker.exe
170992 2372 11880 185244 2d39c unlimited.exe
1091572 22792 15336 1129700 113ce4 cxx_iostream.exe
275128 3340 8304 286772 46034 cdtest.exe
249888 2872 9836 262596 401c4 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
153280 2292 7956 163528 27ec8 base_sp.exe
137816 2212 7568 147596 2408c hello.exe
43296 1736 3876 48908 bf0c minimum.exe
630588 6396 20316 657300 a0794 fileio.exe
178944 2388 8060 189392 2e3d0 nsecs.exe
216596 2676 8604 227876 37a24 paranoia.exe
157536 2304 7988 167828 28f94 ticker.exe
154760 2292 11384 168436 291f4 unlimited.exe
251552 2868 8024 262444 4012c cxx_iostream.exe
251848 2764 8216 262828 402ac cdtest.exe
231896 2760 9780 244436 3bad4 capture.exe
For the mbx821_002b BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
167576 2372 8044 177992 2b748 base_sp.exe
154608 2324 8032 164964 28464 hello.exe
146596 2228 4836 153660 2583c minimum.exe
656748 6480 20648 683876 a6f64 fileio.exe
191744 2464 8148 202356 31674 nsecs.exe
231620 2748 8640 243008 3b540 paranoia.exe
170776 2380 8076 181232 2c3f0 ticker.exe
170976 2372 11880 185228 2d38c unlimited.exe
1091556 22792 15336 1129684 113cd4 cxx_iostream.exe
275128 3340 8304 286772 46034 cdtest.exe
249872 2872 9836 262580 401b4 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
153264 2292 7956 163512 27eb8 base_sp.exe
137816 2212 7568 147596 2408c hello.exe
43280 1736 3876 48892 befc minimum.exe
630572 6396 20316 657284 a0784 fileio.exe
178928 2388 8060 189376 2e3c0 nsecs.exe
216580 2676 8604 227860 37a14 paranoia.exe
157536 2304 7988 167828 28f94 ticker.exe
154760 2292 11384 168436 291f4 unlimited.exe
251552 2868 8024 262444 4012c cxx_iostream.exe
251832 2764 8216 262812 4029c cdtest.exe
231880 2760 9780 244420 3bac4 capture.exe
For the mbx860_001b BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
168960 2372 8080 179412 2bcd4 base_sp.exe
155992 2324 8100 166416 28a10 hello.exe
147980 2228 4872 155080 25dc8 minimum.exe
658132 6480 20720 685332 a7514 fileio.exe
193128 2464 8184 203776 31c00 nsecs.exe
233004 2748 8708 244460 3baec paranoia.exe
172160 2380 8112 182652 2c97c ticker.exe
172360 2372 11916 186648 2d918 unlimited.exe
1092940 22792 15404 1131136 114280 cxx_iostream.exe
276512 3340 8340 288192 465c0 cdtest.exe
251256 2872 9904 264032 40760 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
154648 2292 8024 164964 28464 base_sp.exe
139200 2212 7636 149048 24638 hello.exe
43336 1736 3880 48952 bf38 minimum.exe
631956 6396 20380 658732 a0d2c fileio.exe
180312 2388 8128 190828 2e96c nsecs.exe
217964 2676 8672 229312 37fc0 paranoia.exe
158920 2304 8056 169280 29540 ticker.exe
156144 2292 11452 169888 297a0 unlimited.exe
252936 2868 8092 263896 406d8 cxx_iostream.exe
253216 2764 8284 264264 40848 cdtest.exe
233264 2760 9848 245872 3c070 capture.exe
For the mbx860_002 BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
168976 2372 8080 179428 2bce4 base_sp.exe
156008 2324 8100 166432 28a20 hello.exe
147996 2228 4872 155096 25dd8 minimum.exe
658148 6480 20720 685348 a7524 fileio.exe
193128 2464 8184 203776 31c00 nsecs.exe
233020 2748 8708 244476 3bafc paranoia.exe
172176 2380 8112 182668 2c98c ticker.exe
172376 2372 11916 186664 2d928 unlimited.exe
1092956 22792 15404 1131152 114290 cxx_iostream.exe
276512 3340 8340 288192 465c0 cdtest.exe
251272 2872 9904 264048 40770 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
154664 2292 8024 164980 28474 base_sp.exe
139200 2212 7636 149048 24638 hello.exe
43352 1736 3880 48968 bf48 minimum.exe
631972 6396 20380 658748 a0d3c fileio.exe
180328 2388 8128 190844 2e97c nsecs.exe
217980 2676 8672 229328 37fd0 paranoia.exe
158920 2304 8056 169280 29540 ticker.exe
156144 2292 11452 169888 297a0 unlimited.exe
252936 2868 8092 263896 406d8 cxx_iostream.exe
253232 2764 8284 264280 40858 cdtest.exe
233280 2760 9848 245888 3c080 capture.exe
For the mbx860_005b BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
166816 2300 8080 177196 2b42c base_sp.exe
153848 2252 8100 164200 28168 hello.exe
145836 2156 4872 152864 25520 minimum.exe
655988 6408 20720 683116 a6c6c fileio.exe
190968 2392 8184 201544 31348 nsecs.exe
230860 2676 8708 242244 3b244 paranoia.exe
170016 2308 8112 180436 2c0d4 ticker.exe
170216 2300 11916 184432 2d070 unlimited.exe
1090796 22720 15404 1128920 1139d8 cxx_iostream.exe
274352 3268 8340 285960 45d08 cdtest.exe
249096 2800 9904 261800 3fea8 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
152360 2220 8024 162604 27b2c base_sp.exe
136896 2140 7636 146672 23cf0 hello.exe
42208 1664 3872 47744 ba80 minimum.exe
629668 6324 20380 656372 a03f4 fileio.exe
178040 2316 8128 188484 2e044 nsecs.exe
215660 2604 8672 226936 37678 paranoia.exe
156616 2232 8056 166904 28bf8 ticker.exe
153840 2220 11452 167512 28e58 unlimited.exe
250648 2796 8092 261536 3fda0 cxx_iostream.exe
250944 2692 8284 261920 3ff20 cdtest.exe
230992 2688 9848 243528 3b748 capture.exe
For the mbx860_1b BSP variant:
The size of the sample executables without this option were:
text data bss dec hex filename
168952 2372 8080 179404 2bccc base_sp.exe
155984 2324 8100 166408 28a08 hello.exe
147972 2228 4872 155072 25dc0 minimum.exe
658132 6480 20720 685332 a7514 fileio.exe
193120 2464 8184 203768 31bf8 nsecs.exe
232996 2748 8708 244452 3bae4 paranoia.exe
172152 2380 8112 182644 2c974 ticker.exe
172360 2372 11916 186648 2d918 unlimited.exe
1092932 22792 15404 1131128 114278 cxx_iostream.exe
276512 3340 8340 288192 465c0 cdtest.exe
251256 2872 9904 264032 40760 capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
154640 2292 8024 164956 2845c base_sp.exe
139200 2212 7636 149048 24638 hello.exe
43332 1736 3880 48948 bf34 minimum.exe
631948 6396 20380 658724 a0d24 fileio.exe
180312 2388 8128 190828 2e96c nsecs.exe
217964 2676 8672 229312 37fc0 paranoia.exe
158912 2304 8056 169272 29538 ticker.exe
156136 2292 11452 169880 29798 unlimited.exe
252928 2868 8092 263888 406d0 cxx_iostream.exe
253208 2764 8284 264256 40840 cdtest.exe
233264 2760 9848 245872 3c070 capture.exe
---
c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx821_002b.cfg | 1 +
c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc | 2 ++
2 files changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx821_002b.cfg b/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx821_002b.cfg
index 312ddcb..093b646 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx821_002b.cfg
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx821_002b.cfg
@@ -14,3 +14,4 @@ include $(RTEMS_ROOT)/make/custom/mbx8xx.inc
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc b/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc
index f041d03..fcfda31 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/make/custom/mbx8xx.inc
@@ -45,7 +45,9 @@ CPU_CFLAGS = -mcpu=$(8XX_CPU_TYPE) -Dmpc$(8XX_CPU_TYPE) -D$(RTEMS_MBX_MODEL) \
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+LDFLAGS = -Wl,--gc-sections
LDFLAGS += $(MBX8xx_LDFLAGS)
define bsp-post-link
More information about the vc
mailing list