Changeset 5d75bb6b in rtems


Ignore:
Timestamp:
Mar 10, 2016, 10:49:33 PM (4 years ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
dd642034
Parents:
fd9ea74
git-author:
Joel Sherrill <joel@…> (03/10/16 22:49:33)
git-committer:
Joel Sherrill <joel@…> (03/11/16 00:10:18)
Message:

sh/gensh2: Add per-section compilation and linking support

updates #2577.

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

text data bss dec hex filename

61906 7550 6784 76240 129d0 ticker.exe
24082 3134 2876 30092 758c minimum.exe

336698 47742 36256 420696 66b58 pppd.exe
140210 20034 9684 169928 297c8 capture.exe

75058 7962 6861 89881 15f19 nsecs.exe

128850 18446 7352 154648 25c18 paranoia.exe
142898 22794 7844 173536 2a5e0 cdtest.exe

59618 6734 6752 73104 11d90 base_sp.exe
62066 6970 10576 79612 136fc unlimited.exe
76066 5322 6732 88120 15838 hello.exe

200630 19846 14080 234556 3943c loopback.exe

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

text data bss dec hex filename

58402 7030 6768 72200 11a08 ticker.exe
13218 1502 1844 16564 40b4 minimum.exe

298562 40502 35448 374512 5b6f0 pppd.exe
133826 19250 9660 162736 27bb0 capture.exe

71826 7422 6833 86081 15041 nsecs.exe

124050 17902 7328 149280 24720 paranoia.exe
138658 11998 7832 158488 26b18 cdtest.exe

55330 6210 6724 68264 10aa8 base_sp.exe
52898 5398 9516 67812 108e4 unlimited.exe
66482 3738 5684 75904 12880 hello.exe

179618 14182 13916 207716 32b64 loopback.exe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sh/gensh2/make/custom/gensh2.cfg

    rfd9ea74 r5d75bb6b  
    1414#  This contains the compiler options necessary to select the CPU model
    1515#  and (hopefully) optimize for it.
    16 #
    1716CPU_CFLAGS = -m2
    1817
    1918# optimize flag: typically -O2
    2019CFLAGS_OPTIMIZE_V = -O2 -g
     20CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
     21
     22LDFLAGS = -Wl,--gc-sections
Note: See TracChangeset for help on using the changeset viewer.