summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Holmes <ralph@ybden.com>2016-01-19 20:59:29 +0000
committerJoel Sherrill <joel@rtems.org>2016-01-19 17:12:23 -0600
commit82d2ec4bf4e7523218dfc2a800275965e7f256c0 (patch)
tree6b65602b38f793c3fa9c9b77ae1b55107f14a0af
parentposix/src/exec*: Remove all variants already in Newlib (diff)
downloadrtems-82d2ec4bf4e7523218dfc2a800275965e7f256c0.tar.bz2
mips/malta: Add per-section compilation and linking support.
The size of the sample executables without this option were: text data bss dec hex filename 276796 2076 16544 295416 481f8 base_sp.exe 272996 2044 16080 291120 47130 hello.exe 210632 1828 12800 225260 36fec minimum.exe 1102500 6380 28968 1137848 115cb8 fileio.exe 303952 2204 16648 322804 4ecf4 nsecs.exe 361424 2508 17168 381100 5d0ac paranoia.exe 284876 2076 16592 303544 4a1b8 ticker.exe 282988 2108 19984 305080 4a7b8 unlimited.exe 1308448 2436 24016 1334900 145e74 cxx_iostream.exe 407228 2140 16928 426296 68138 cdtest.exe 431492 2748 18420 452660 6e834 capture.exe The size of the sample executables with this option enabled were: text data bss dec hex filename 244480 1968 16384 262832 402b0 base_sp.exe 237488 1908 15952 255348 3e574 hello.exe 126448 1480 12656 140584 22528 minimum.exe 1052392 6112 28328 1086832 109570 fileio.exe 274708 2088 16504 293300 479b4 nsecs.exe 329108 2384 17040 348532 55174 paranoia.exe 254748 1968 16416 273132 42aec ticker.exe 248112 1984 19776 269872 41e30 unlimited.exe 753136 2300 22976 778412 be0ac cxx_iostream.exe 371596 2032 16752 390380 5f4ec cdtest.exe 392480 2572 18244 413296 64e70 capture.exe
-rw-r--r--c/src/lib/libbsp/mips/malta/make/custom/malta.cfg3
1 files changed, 3 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/mips/malta/make/custom/malta.cfg b/c/src/lib/libbsp/mips/malta/make/custom/malta.cfg
index f44b5e98a2..2bd1eab988 100644
--- a/c/src/lib/libbsp/mips/malta/make/custom/malta.cfg
+++ b/c/src/lib/libbsp/mips/malta/make/custom/malta.cfg
@@ -13,3 +13,6 @@ CPU_CFLAGS = -march=24kf1_1 -Wa,-xgot -G0
# optimize flag: typically -O2
CFLAGS_OPTIMIZE_V = -O0 -g
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
+
+LDFLAGS = -Wl,--gc-sections