[rtems commit] epiphany/epiphany_sim: Add per-section compilation and linking support

Joel Sherrill joel at rtems.org
Fri Mar 11 20:14:54 UTC 2016


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

Author:    Joel Sherrill <joel at rtems.org>
Date:      Thu Mar 10 15:09:24 2016 -0600

epiphany/epiphany_sim: Add per-section compilation and linking support

updates #2577.

For the epiphany_sim BSP variant without this option sample
executables sizes were as follows:

   text	   data	    bss	    	  dec	    	  hex	filename
 198728	   1792	16576900	16777420	10000cc	ticker.exe
  74136	   1148	16702144	16777428	10000d4	minimum.exe
 839480	   7892	15930052	16777424	10000d0	cxx_iostream.exe
 957640	   6160	15813636	16777436	10000dc	fileio.exe
 332904	   2644	16441920	16777468	10000fc	capture.exe
 214176	   1892	16561344	16777412	10000c4	nsecs.exe
 291112	   2208	16484100	16777420	10000cc	paranoia.exe
 312096	   2208	16463108	16777412	10000c4	cdtest.exe
 190888	   1792	16584772	16777452	10000ec	base_sp.exe
 196336	   1824	16579268	16777428	10000d4	unlimited.exe
 195344	   1768	16580356	16777468	10000fc	hello.exe

For the epiphany_sim BSP variant with this option sample executables
sizes were as follows:

   text	   data	    bss	    	  dec	    	  hex	filename
 187784	   1752	16587908	16777444	10000e4	ticker.exe
  51560	    292	16725568	16777420	10000cc	minimum.exe
 581040	   3920	16192452	16777412	10000c4	cxx_iostream.exe
 930736	   6112	15840580	16777428	10000d4	fileio.exe
 312448	   2564	16462400	16777412	10000c4	capture.exe
 204424	   1852	16571136	16777412	10000c4	nsecs.exe
 278248	   2160	16497028	16777436	10000dc	paranoia.exe
 296488	   2088	16478852	16777428	10000d4	cdtest.exe
 178024	   1752	16597636	16777412	10000c4	base_sp.exe
 182952	   1784	16592708	16777444	10000e4	unlimited.exe
 181688	   1728	16594052	16777468	10000fc	hello.exe

---

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

diff --git a/c/src/lib/libbsp/epiphany/epiphany_sim/make/custom/epiphany_sim.cfg b/c/src/lib/libbsp/epiphany/epiphany_sim/make/custom/epiphany_sim.cfg
index 9eea2a0..1fef608 100644
--- a/c/src/lib/libbsp/epiphany/epiphany_sim/make/custom/epiphany_sim.cfg
+++ b/c/src/lib/libbsp/epiphany/epiphany_sim/make/custom/epiphany_sim.cfg
@@ -5,3 +5,6 @@ RTEMS_CPU = epiphany
 CPU_CFLAGS =
 
 CFLAGS_OPTIMIZE_V ?= -O0 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections




More information about the vc mailing list