[rtems commit] powerpc/mvme3100: Add per-section compilation and linking support.

Joel Sherrill joel at rtems.org
Sat Jan 23 19:17:53 UTC 2016


Module:    rtems
Branch:    master
Commit:    e5e0acde71f4506b5fd764085f7cfc054a62b739
Changeset: http://git.rtems.org/rtems/commit/?id=e5e0acde71f4506b5fd764085f7cfc054a62b739

Author:    Ralph Holmes <ralph at ybden.com>
Date:      Sat Jan 23 18:23:43 2016 +0000

powerpc/mvme3100: Add per-section compilation and linking support.

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 225361	  22724	  12225	 260310	  3f8d6	base_sp.exe
 212945	  21548	  12185	 246678	  3c396	hello.exe
 205697	  20928	   8957	 235582	  3983e	minimum.exe
 620337	  89970	  24477	 734784	  b3640	fileio.exe
 241825	  24076	  12329	 278230	  43ed6	nsecs.exe
 284977	  34836	  12893	 332706	  513a2	paranoia.exe
 228529	  22892	  12257	 263678	  405fe	ticker.exe
 227729	  23660	  16001	 267390	  4147e	unlimited.exe
 959985	 210142	  19861	1189988	 122864	cxx_iostream.exe
 297137	  40024	  12897	 350058	  5576a	cdtest.exe
 276161	  32508	  14049	 322718	  4ec9e	capture.exe

The size of the sample executables with this option enabled were:

   text	   data	    bss	    dec	    hex	filename
 196945	  19224	  12201	 228370	  37c12	base_sp.exe
 182641	  18080	  12153	 212874	  33f8a	hello.exe
 158817	  16492	   8637	 183946	  2ce8a	minimum.exe
 581681	  84474	  24193	 690348	  a88ac	fileio.exe
 214177	  20552	  12305	 247034	  3c4fa	nsecs.exe
 256209	  31312	  12865	 300386	  49562	paranoia.exe
 200401	  19392	  12233	 232026	  38a5a	ticker.exe
 197745	  20132	  15969	 233846	  39176	unlimited.exe
 614501	  47958	  19045	 681504	  a6620	cxx_iostream.exe
 269993	  28400	  12873	 311266	  4bfe2	cdtest.exe
 247201	  28792	  14025	 290018	  46ce2	capture.exe

---

 c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg b/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg
index ddd6d23..1428631 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg
+++ b/c/src/lib/libbsp/powerpc/mvme3100/make/custom/mvme3100.cfg
@@ -14,6 +14,9 @@ CPU_CFLAGS = -mcpu=powerpc -msoft-float -D__ppc_generic
 
 # optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections
 
 define bsp-post-link
 	$(default-bsp-post-link)



More information about the vc mailing list