[PATCH 12/32] arm/xilinx_zynq: Add per-section compilation and linking support
Joel Sherrill
joel at rtems.org
Fri Mar 11 00:15:16 UTC 2016
updates #2577.
For the xilinx_zynq_a9_qemu BSP variant without this option,
sample executables sizes were as follows:
text data bss dec hex filename
138192 1804 268279008 268419004 fffbfbc ticker.exe
102885 1564 268314576 268419025 fffbfd1 minimum.exe
632900 2092 267784004 268418996 fffbfb4 cxx_iostream.exe
606214 6048 267806752 268419014 fffbfc6 fileio.exe
479152 14448 267925424 268419024 fffbfd0 pppd.exe
228076 2560 268188360 268418996 fffbfb4 capture.exe
148874 1892 268268260 268419026 fffbfd2 nsecs.exe
209448 2212 268207368 268419028 fffbfd4 paranoia.exe
201620 1828 268215560 268419008 fffbfc0 cdtest.exe
133988 1804 268283212 268419004 fffbfbc base_sp.exe
137872 1836 268279296 268419004 fffbfbc unlimited.exe
135040 1780 268282192 268419012 fffbfc4 hello.exe
297812 6820 268114384 268419016 fffbfc8 loopback.exe
For the xilinx_zynq_a9_qemu BSP variant with this option,
sample executables sizes were as follows:
text data bss dec hex filename
138192 1804 268279008 268419004 fffbfbc ticker.exe
102885 1564 268314576 268419025 fffbfd1 minimum.exe
632900 2092 267784004 268418996 fffbfb4 cxx_iostream.exe
606214 6048 267806752 268419014 fffbfc6 fileio.exe
479152 14448 267925424 268419024 fffbfd0 pppd.exe
228076 2560 268188360 268418996 fffbfb4 capture.exe
148874 1892 268268260 268419026 fffbfd2 nsecs.exe
209448 2212 268207368 268419028 fffbfd4 paranoia.exe
201620 1828 268215560 268419008 fffbfc0 cdtest.exe
133988 1804 268283212 268419004 fffbfbc base_sp.exe
137872 1836 268279296 268419004 fffbfbc unlimited.exe
135040 1780 268282192 268419012 fffbfc4 hello.exe
297812 6820 268114384 268419016 fffbfc8 loopback.exe
For the xilinx_zynq_zc702 BSP variant without this option,
sample executables sizes were as follows:
text data bss dec hex filename
71228 1804 1072603792 1072676824 3fefbfd8 ticker.exe
48069 1564 1072627212 1072676845 3fefbfed minimum.exe
563744 2092 1072110984 1072676820 3fefbfd4 cxx_iostream.exe
406598 5888 1072264352 1072676838 3fefbfe6 fileio.exe
313164 12704 1072350960 1072676828 3fefbfdc pppd.exe
139572 2440 1072534816 1072676828 3fefbfdc capture.exe
83026 1892 1072591928 1072676846 3fefbfee nsecs.exe
121060 2188 1072553576 1072676824 3fefbfd8 paranoia.exe
133888 1828 1072541112 1072676828 3fefbfdc cdtest.exe
69008 1804 1072606012 1072676824 3fefbfd8 base_sp.exe
71268 1836 1072603720 1072676824 3fefbfd8 unlimited.exe
76260 1780 1072598792 1072676832 3fefbfe0 hello.exe
188672 6596 1072481568 1072676836 3fefbfe4 loopback.exe
For the xilinx_zynq_zc702 BSP variant with this option,
sample executables sizes were as follows:
text data bss dec hex filename
65168 1788 1072609884 1072676840 3fefbfe8 ticker.exe
30184 1492 1072645164 1072676840 3fefbfe8 minimum.exe
350588 2044 1072324204 1072676836 3fefbfe4 cxx_iostream.exe
393310 5872 1072277640 1072676822 3fefbfd6 fileio.exe
289480 12548 1072374820 1072676848 3fefbff0 pppd.exe
131740 2416 1072542680 1072676836 3fefbfe4 capture.exe
77306 1876 1072597648 1072676830 3fefbfde nsecs.exe
114932 2164 1072559736 1072676832 3fefbfe0 paranoia.exe
125904 1812 1072549128 1072676844 3fefbfec cdtest.exe
62824 1788 1072612228 1072676840 3fefbfe8 base_sp.exe
63148 1796 1072611904 1072676848 3fefbff0 unlimited.exe
67820 1724 1072607296 1072676840 3fefbfe8 hello.exe
173288 6484 1072497056 1072676828 3fefbfdc loopback.exe
For the xilinx_zynq_zc706 BSP variant without this option,
sample executables sizes were as follows:
text data bss dec hex filename
71228 1804 1069458064 1069531096 3fbfbfd8 ticker.exe
48069 1564 1069481484 1069531117 3fbfbfed minimum.exe
563744 2092 1068965256 1069531092 3fbfbfd4 cxx_iostream.exe
406598 5888 1069118624 1069531110 3fbfbfe6 fileio.exe
313164 12704 1069205232 1069531100 3fbfbfdc pppd.exe
139572 2440 1069389088 1069531100 3fbfbfdc capture.exe
83026 1892 1069446200 1069531118 3fbfbfee nsecs.exe
121060 2188 1069407848 1069531096 3fbfbfd8 paranoia.exe
133888 1828 1069395384 1069531100 3fbfbfdc cdtest.exe
69008 1804 1069460284 1069531096 3fbfbfd8 base_sp.exe
71268 1836 1069457992 1069531096 3fbfbfd8 unlimited.exe
76260 1780 1069453064 1069531104 3fbfbfe0 hello.exe
188672 6596 1069335840 1069531108 3fbfbfe4 loopback.exe
For the xilinx_zynq_zc706 BSP variant with this option,
sample executables sizes were as follows:
text data bss dec hex filename
65168 1788 1069464156 1069531112 3fbfbfe8 ticker.exe
30184 1492 1069499436 1069531112 3fbfbfe8 minimum.exe
350588 2044 1069178476 1069531108 3fbfbfe4 cxx_iostream.exe
393310 5872 1069131912 1069531094 3fbfbfd6 fileio.exe
289480 12548 1069229092 1069531120 3fbfbff0 pppd.exe
131740 2416 1069396952 1069531108 3fbfbfe4 capture.exe
77306 1876 1069451920 1069531102 3fbfbfde nsecs.exe
114932 2164 1069414008 1069531104 3fbfbfe0 paranoia.exe
125904 1812 1069403400 1069531116 3fbfbfec cdtest.exe
62824 1788 1069466500 1069531112 3fbfbfe8 base_sp.exe
63148 1796 1069466176 1069531120 3fbfbff0 unlimited.exe
67820 1724 1069461568 1069531112 3fbfbfe8 hello.exe
173288 6484 1069351328 1069531100 3fbfbfdc loopback.exe
For the xilinx_zynq_zedboard BSP variant without this option,
sample executables sizes were as follows:
text data bss dec hex filename
71228 1804 535732880 535805912 1fefbfd8 ticker.exe
48069 1564 535756300 535805933 1fefbfed minimum.exe
563744 2092 535240072 535805908 1fefbfd4 cxx_iostream.exe
406601 5888 535393436 535805925 1fefbfe5 fileio.exe
313164 12704 535480048 535805916 1fefbfdc pppd.exe
139572 2440 535663904 535805916 1fefbfdc capture.exe
83026 1892 535721016 535805934 1fefbfee nsecs.exe
121060 2188 535682664 535805912 1fefbfd8 paranoia.exe
133888 1828 535670200 535805916 1fefbfdc cdtest.exe
69008 1804 535735100 535805912 1fefbfd8 base_sp.exe
71268 1836 535732808 535805912 1fefbfd8 unlimited.exe
76260 1780 535727880 535805920 1fefbfe0 hello.exe
188672 6596 535610656 535805924 1fefbfe4 loopback.exe
For the xilinx_zynq_zedboard BSP variant with this option,
sample executables sizes were as follows:
text data bss dec hex filename
65168 1788 535738972 535805928 1fefbfe8 ticker.exe
30184 1492 535774252 535805928 1fefbfe8 minimum.exe
350588 2044 535453292 535805924 1fefbfe4 cxx_iostream.exe
393313 5872 535406724 535805909 1fefbfd5 fileio.exe
289480 12548 535503908 535805936 1fefbff0 pppd.exe
131740 2416 535671768 535805924 1fefbfe4 capture.exe
77306 1876 535726736 535805918 1fefbfde nsecs.exe
114932 2164 535688824 535805920 1fefbfe0 paranoia.exe
125904 1812 535678216 535805932 1fefbfec cdtest.exe
62824 1788 535741316 535805928 1fefbfe8 base_sp.exe
63148 1796 535740992 535805936 1fefbff0 unlimited.exe
67820 1724 535736384 535805928 1fefbfe8 hello.exe
173288 6484 535626144 535805916 1fefbfdc loopback.exe
---
c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq.inc b/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq.inc
index 1cbe747..59c18f7 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq.inc
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/make/custom/xilinx_zynq.inc
@@ -5,3 +5,6 @@ RTEMS_CPU = arm
CPU_CFLAGS = -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9
CFLAGS_OPTIMIZE_V ?= -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
--
1.8.3.1
More information about the devel
mailing list