[rtems commit] powerpc/virtex5: Add per-section compilation and linking support.
Joel Sherrill
joel at rtems.org
Sat Jan 23 20:45:56 UTC 2016
Module: rtems
Branch: master
Commit: 82bf2773a67323acb54b2426e525060dc29c5caa
Changeset: http://git.rtems.org/rtems/commit/?id=82bf2773a67323acb54b2426e525060dc29c5caa
Author: Ralph Holmes <ralph at ybden.com>
Date: Sat Jan 23 18:40:43 2016 +0000
powerpc/virtex5: Add per-section compilation and linking support.
The size of the sample executables without this option were:
text data bss dec hex filename
117297 9206 6797 133300 208b4 base_sp.exe
133249 8030 6757 148036 24244 hello.exe
51473 5066 3217 59756 e96c minimum.exe
568081 80530 19053 667664 a3010 fileio.exe
140193 10950 6901 158044 2695c nsecs.exe
206113 21330 7465 234908 3959c paranoia.exe
120465 9374 6829 136668 215dc ticker.exe
119665 9390 10573 139628 2216c unlimited.exe
883345 198988 14433 1096766 10bc3e cxx_iostream.exe
225057 26914 7469 259440 3f570 cdtest.exe
221937 23050 8625 253612 3deac capture.exe
The size of the sample executables with this option enabled were:
text data bss dec hex filename
105569 7804 6777 120150 1d556 base_sp.exe
119025 6596 6729 132350 204fe hello.exe
40177 3720 3197 47094 b7f6 minimum.exe
546465 77136 18773 642374 9cd46 fileio.exe
129217 9526 6881 145624 238d8 nsecs.exe
193617 19908 7441 220966 35f26 paranoia.exe
108993 7972 6809 123774 1e37e ticker.exe
106129 7884 10545 124558 1e68e unlimited.exe
554997 38836 13621 607454 944de cxx_iostream.exe
215193 17384 7449 240026 3a99a cdtest.exe
207809 21400 8605 237814 3a0f6 capture.exe
---
c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg b/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg
index 9601fbc..f2cb727 100644
--- a/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg
+++ b/c/src/lib/libbsp/powerpc/virtex5/make/custom/virtex5.cfg
@@ -10,6 +10,9 @@ CPU_CFLAGS = -mcpu=440 -Dppc440 -msoft-float
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
# Miscellaneous additions go here
define bsp-post-link
More information about the vc
mailing list