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

Joel Sherrill joel at rtems.org
Sat Jan 23 19:25:40 UTC 2016


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

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

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

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 193649	  21100	  15365	 230114	  382e2	base_sp.exe
 181425	  19928	  15325	 216678	  34e66	hello.exe
 174257	  19452	  12097	 205806	  323ee	minimum.exe
 613505	  89234	  27649	 730388	  b2514	fileio.exe
 216977	  22848	  15469	 255294	  3e53e	nsecs.exe
 226897	  33644	  16033	 276574	  4385e	paranoia.exe
 196849	  21268	  15397	 233514	  3902a	ticker.exe
 196401	  22044	  19173	 237618	  3a032	unlimited.exe
 947265	 209858	  23001	1180124	 1201dc	cxx_iostream.exe
 284753	  39784	  16037	 340574	  5325e	cdtest.exe
 263073	  31692	  17189	 311954	  4c292	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 168257	  17808	  15281	 201346	  31282	base_sp.exe
 154113	  16692	  15201	 186006	  2d696	hello.exe
 124545	  14548	  11713	 150806	  24d16	minimum.exe
 578049	  83946	  27273	 689268	  a8474	fileio.exe
 192337	  19556	  15385	 227278	  377ce	nsecs.exe
 201249	  30328	  15913	 247490	  3c6c2	paranoia.exe
 171681	  17976	  15313	 204970	  320aa	ticker.exe
 169441	  18732	  19049	 207222	  32976	unlimited.exe
 604757	  47466	  22093	 674316	  a4a0c	cxx_iostream.exe
 260569	  27820	  15921	 304310	  4a4b6	cdtest.exe
 237217	  28200	  17105	 282522	  44f9a	capture.exe

---

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

diff --git a/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg b/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg
index 4c59a07..145b43b 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg
+++ b/c/src/lib/libbsp/powerpc/mvme5500/make/custom/mvme5500.cfg
@@ -16,6 +16,9 @@ CPU_CFLAGS = -mcpu=7450 -mtune=7450 -Dmpc7455
 
 # 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