The size of the sample executables without this option were:

 128028    1812   12224  142064   22af0 ticker.exe
  52600    1324    8192   62116    f2a4 minimum.exe
1156240    2168   19696 1178104  11f9f8 cxx_iostream.exe
 706952    5908   24600  737460   b40b4 fileio.exe
 243232    2372   14084  259688   3f668 capture.exe
 155660    1940   12376  169976   297f8 nsecs.exe
 201256    2212   12896  216364   34d2c paranoia.exe
 253696    1872   12576  268144   41770 cdtest.exe
 124452    1812   12208  138472   21ce8 base_sp.exe
 127640    1844   15648  145132   236ec unlimited.exe
 133452    1780   11760  146992   23e30 hello.exe

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

 115052    1712   12096  128860   1f75c ticker.exe
  40760    1256    8144   50160    c3f0 minimum.exe
 671768    2076   18688  692532   a9134 cxx_iostream.exe
 679672    5696   23992  709360   ad2f0 fileio.exe
 227384    2196   13924  243504   3b730 capture.exe
 143132    1832   12248  157212   2661c nsecs.exe
 187736    2104   12768  202608   31770 paranoia.exe
 234324    1788   12448  248560   3caf0 cdtest.exe
 111556    1712   12080  125348   1e9a4 base_sp.exe
 112876    1744   15520  130140   1fc5c unlimited.exe
 118120    1688   11696  131504   201b0 hello.exe
---
 c/src/lib/libbsp/mips/jmr3904/make/custom/jmr3904.cfg | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/c/src/lib/libbsp/mips/jmr3904/make/custom/jmr3904.cfg 
b/c/src/lib/libbsp/mips/jmr3904/make/custom/jmr3904.cfg
index 056f63c..6b76135 100644
--- a/c/src/lib/libbsp/mips/jmr3904/make/custom/jmr3904.cfg
+++ b/c/src/lib/libbsp/mips/jmr3904/make/custom/jmr3904.cfg
@@ -10,3 +10,8 @@ RTEMS_CPU_MODEL=tx3904
 CPU_CFLAGS = -march=r3900 -Wa,-xgot -G0
 
 CFLAGS_OPTIMIZE_V = -O2 -g
+
+# arguments to compile and link with per-element sections
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+LDFLAGS            = -Wl,--gc-sections
+
-- 
1.8.3.1

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to