[rtems commit] powerpc/haleakala: Add per-section compilation and linking support (GCI 2018)

Joel Sherrill joel at rtems.org
Fri Nov 30 20:11:46 UTC 2018


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

Author:    Shashvat Jain <shashvatjain2002 at gmail.com>
Date:      Fri Nov 30 14:01:50 2018 -0500

powerpc/haleakala:Add per-section compilation and linking support (GCI 2018)

The size of the sample executables without this option were:

   text	   data	    bss	    dec	    hex	filename
 104144	   1316	  16112	 121572	  1dae4	./base_sp.exe
 263120	   2424	  19356	 284900	  458e4	./capture.exe
 315012	   2300	  17184	 334496	  51aa0	./cdtest.exe
1103896	   2350	  23988	1130234	 113efa	./cxx_iostream.exe
 654832	   4986	  29400	 689218	  a8442	./fileio.exe
 143328	   1664	  16264	 161256	  275e8	./hello.exe
 329540	   6228	  23096	 358864	  579d0	./loopback.exe
  80264	   1124	  12868	  94256	  17030	./minimum.exe
 133600	   1832	  16216	 151648	  25060	./nsecs.exe
 215024	   2096	  16904	 234024	  39228	./paranoia.exe
 571768	  12532	  46100	 630400	  99e80	./pppd.exe
 107872	   1340	  16148	 125360	  1e9b0	./ticker.exe
 107856	   1308	  20008	 129172	  1f894	./unlimited.exe

The size of the sample executables with this option were:

   text	   data	    bss	    dec	    hex	filename
 612124	   2106	  22800	 637030	  9b866	./cxx_iostream.exe
 641180	   4986	  29104	 675270	  a4dc6	./fileio.exe
 132316	   1664	  16228	 150208	  24ac0	./hello.exe
 309544	   6212	  23028	 338784	  52b60	./loopback.exe
  74028	   1108	  12804	  87940	  15784	./minimum.exe
 125372	   1836	  16148	 143356	  22ffc	./nsecs.exe
 204556	   2088	  16868	 223512	  36918	./paranoia.exe
 555528	  12540	  46032	 614100	  95ed4	./pppd.exe
 101548	   1356	  16052	 118956	  1d0ac	./ticker.exe
 105916	   1284	  19976	 127176	  1f0c8	./unlimited.exe
  98268	   1300	  16016	 115584	  1c380	./base_sp.exe
 246364	   2404	  19320	 268088	  41738	./capture.exe
 229184	   1836	  17148	 248168	  3c968	./cdtest.exe

Closes #2561

---

 bsps/powerpc/haleakala/config/haleakala.cfg | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/bsps/powerpc/haleakala/config/haleakala.cfg b/bsps/powerpc/haleakala/config/haleakala.cfg
index 148c699..57feb35 100644
--- a/bsps/powerpc/haleakala/config/haleakala.cfg
+++ b/bsps/powerpc/haleakala/config/haleakala.cfg
@@ -17,10 +17,9 @@ CPU_CFLAGS = -mcpu=405
 # NOTE: some level of -O may be actually required by inline assembler
 CFLAGS_OPTIMIZE_V = -O1 -g
 
-# FIXME: Disabled because linkcmds lacks proper KEEP() directives. See #2561.
 # The following two lines enable compiling and linking on per element.
-# CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
-# LDFLAGS = -Wl,--gc-sections
+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