m68k/mcf5225x: Add per-section compilation and linking support.

The size of the sample executables without this option were:

   text    data     bss     dec     hex filename
  96608    1680    7664  105952   19de0 base_sp.exe
 109392    1648    7216  118256   1cdf0 hello.exe
  34768    1216    4912   40896    9fc0 minimum.exe
 115392    1760    7776  124928   1e800 nsecs.exe
 195040    2048    8272  205360   32230 paranoia.exe
 100336    1680    7696  109712   1ac90 ticker.exe
  98336    1712   11056  111104   1b200 unlimited.exe
 203472    2272    7840  213584   34250 cdtest.exe
 196992    2176    9488  208656   32f10 capture.exe

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

   text	   data	    bss	    dec	    hex	filename
  88688	   1648	   7616	  97952	  17ea0	base_sp.exe
  99760	   1600	   7152	 108512	  1a7e0	hello.exe
  22864	   1184	   4864	  28912	   70f0	minimum.exe
 107984	   1728	   7712	 117424	  1cab0	nsecs.exe
 186672	   2032	   8208	 196912	  30130	paranoia.exe
  92592	   1648	   7632	 101872	  18df0	ticker.exe
  89056	   1664	  10992	 101712	  18d50	unlimited.exe
 187200	   2144	   7760	 197104	  301f0	cdtest.exe
 186960	   2128	   9440	 198528	  30780	capture.exe
This commit is contained in:
Ralph Holmes
2016-01-23 02:07:35 +00:00
committed by Joel Sherrill
parent 516dab50ec
commit 72757566af

View File

@@ -16,7 +16,9 @@ CPU_CFLAGS = -mcpu=52235 $(PROJECT_FLAGS)
# optimize flag: typically -O2 # optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O2 -fomit-frame-pointer CFLAGS_OPTIMIZE_V = -O2 -fomit-frame-pointer
#CFLAGS_OPTIMIZE_V = -g CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
LDFLAGS = -Wl,--gc-sections
# This defines the operations performed on the linked executable. # This defines the operations performed on the linked executable.
# is currently required. # is currently required.