[PATCH 30/32] sparc64/niagara: Add per-section compilation and linking support
Joel Sherrill
joel at rtems.org
Fri Mar 11 00:15:35 UTC 2016
updates #2577.
For the niagara BSP variant without this option sample executables
sizes were as follows:
text data bss dec hex filename
143616 2704 2113472 2259792 227b50 ticker.exe
71872 1720 2105312 2178904 213f58 minimum.exe
983600 3128 2126160 3112888 2f7fb8 cxx_iostream.exe
648448 8864 2129200 2786512 2a84d0 fileio.exe
548976 21520 2147872 2718368 297aa0 pppd.exe
253344 3872 2117440 2374656 243c00 capture.exe
161520 2840 2113616 2277976 22c258 nsecs.exe
215568 3344 2114112 2333024 239960 paranoia.exe
261744 2728 2115328 2379800 245018 cdtest.exe
139648 2704 2113440 2255792 226bb0 base_sp.exe
142416 2712 2117216 2262344 228548 unlimited.exe
150464 2648 2113424 2266536 2295a8 hello.exe
343504 10704 2126400 2480608 25d9e0 loopback.exe
For the niagara BSP variant with this option sample executables
sizes were as follows:
text data bss dec hex filename
133408 2624 2113184 2249216 225200 ticker.exe
57152 320 2100928 2158400 20ef40 minimum.exe
590160 3024 2120400 2713584 2967f0 cxx_iostream.exe
623568 8784 2128640 2760992 2a2120 fileio.exe
503616 21256 2146816 2671688 28c448 pppd.exe
239152 3752 2117152 2360056 2402f8 capture.exe
152128 2760 2113312 2268200 229c28 nsecs.exe
203808 3256 2113808 2320872 2369e8 paranoia.exe
244128 2656 2115040 2361824 2409e0 cdtest.exe
128672 2616 2113152 2244440 223f58 base_sp.exe
129408 2608 2112816 2244832 2240e0 unlimited.exe
137040 2528 2109040 2248608 224fa0 hello.exe
314256 10520 2126016 2450792 256568 loopback.exe
---
c/src/lib/libbsp/sparc64/niagara/make/custom/niagara.cfg | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/sparc64/niagara/make/custom/niagara.cfg b/c/src/lib/libbsp/sparc64/niagara/make/custom/niagara.cfg
index 187e1fa..1178993 100644
--- a/c/src/lib/libbsp/sparc64/niagara/make/custom/niagara.cfg
+++ b/c/src/lib/libbsp/sparc64/niagara/make/custom/niagara.cfg
@@ -15,3 +15,6 @@ CPU_CFLAGS = -mcpu=niagara -DSUN4V
# optimize flag: typically -g -O2
CFLAGS_OPTIMIZE_V = -g -O2
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
--
1.8.3.1
More information about the devel
mailing list