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

Joel Sherrill joel at rtems.org
Sat Jan 23 19:49:13 UTC 2016


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

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

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

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 131246	   2224	134084236	134217706	7ffffea	base_sp.exe
 145442	   2108	134070140	134217690	7ffffda	hello.exe
  87857	   1816	134128016	134217689	7ffffd9	minimum.exe
 658358	   6206	133553148	134217712	7fffff0	fileio.exe
 155574	   2320	134059800	134217694	7ffffde	nsecs.exe
 220670	   2600	133994432	134217702	7ffffe6	paranoia.exe
 135534	   2232	134079948	134217714	7fffff2	ticker.exe
 133626	   2240	134081828	134217694	7ffffde	unlimited.exe
 943592	 148090	133126008	134217690	7ffffda	cxx_iostream.exe
 250066	   9528	133958096	134217690	7ffffda	cdtest.exe
 246978	   2728	133968004	134217710	7ffffee	capture.exe

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

   text	   data	    bss	    dec	    hex	filename
 116650	   2216	134098828	134217694	7ffffde	base_sp.exe
 128558	   2068	134087092	134217718	7fffff6	hello.exe
  47222	   1560	134168916	134217698	7ffffe2	minimum.exe
 632422	   6194	133579072	134217688	7ffffd8	fileio.exe
 141782	   2312	134073624	134217718	7fffff6	nsecs.exe
 206018	   2592	134009108	134217718	7fffff6	paranoia.exe
 121258	   2224	134094220	134217702	7ffffe6	ticker.exe
 117378	   2216	134098108	134217702	7ffffe6	unlimited.exe
 602026	  51306	133564344	134217676	7ffffcc	cxx_iostream.exe
 236658	   8188	133972848	134217694	7ffffde	cdtest.exe
 230070	   2688	133984932	134217690	7ffffda	capture.exe

---

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

diff --git a/c/src/lib/libbsp/powerpc/t32mppc/make/custom/t32mppc.cfg b/c/src/lib/libbsp/powerpc/t32mppc/make/custom/t32mppc.cfg
index dfb489a..1bbfe76 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/make/custom/t32mppc.cfg
+++ b/c/src/lib/libbsp/powerpc/t32mppc/make/custom/t32mppc.cfg
@@ -6,3 +6,6 @@ CPU_CFLAGS = -mcpu=8540 -meabi -msdata=sysv -fno-common -msoft-float -mno-spe \
 	-D__ppc_generic
 
 CFLAGS_OPTIMIZE_V = -Og -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections




More information about the vc mailing list