<div dir="ltr">hello and ticker fail to run with this commit. <br><br><div class="gmail_quote"><div dir="ltr">On Sat, Mar 12, 2016 at 7:14 AM Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Module: rtems<br>
Branch: master<br>
Commit: e1768fdd950fb24004183cdfdbef0bcd1a07908c<br>
Changeset: <a href="http://git.rtems.org/rtems/commit/?id=e1768fdd950fb24004183cdfdbef0bcd1a07908c" rel="noreferrer" target="_blank">http://git.rtems.org/rtems/commit/?id=e1768fdd950fb24004183cdfdbef0bcd1a07908c</a><br>
<br>
Author: Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>><br>
Date: Thu Mar 10 16:28:12 2016 -0600<br>
<br>
or1k/generic_or1k: Add per-section compilation and linking support<br>
<br>
updates #2577.<br>
<br>
For the generic_or1k BSP variant without this option sample<br>
executables sizes were as follows:<br>
<br>
text data bss dec hex filename<br>
255044 1780 33297600 33554424 1fffff8 ticker.exe<br>
188484 1496 33364448 33554428 1fffffc minimum.exe<br>
829728 77432 32647264 33554424 1fffff8 cxx_iostream.exe<br>
1110588 6112 32437728 33554428 1fffffc fileio.exe<br>
881676 14420 32658304 33554400 1ffffe0 pppd.exe<br>
428200 2556 33123648 33554404 1ffffe4 capture.exe<br>
274012 1868 33278528 33554408 1ffffe8 nsecs.exe<br>
398084 2184 33154144 33554412 1ffffec paranoia.exe<br>
387348 7420 33159648 33554416 1fffff0 cdtest.exe<br>
247752 1780 33304896 33554428 1fffffc base_sp.exe<br>
253888 1808 33298720 33554416 1fffff0 unlimited.exe<br>
261792 1752 33290880 33554424 1fffff8 hello.exe<br>
569612 6792 32978016 33554420 1fffff4 loopback.exe<br>
<br>
For the generic_or1k BSP variant with this option sample executables<br>
sizes were as follows:<br>
<br>
text data bss dec hex filename<br>
229804 1760 33314592 33546156 1ffdfac ticker.exe<br>
118744 1424 33425984 33546152 1ffdfa8 minimum.exe<br>
607344 29188 32909632 33546164 1ffdfb4 cxx_iostream.exe<br>
1064124 6088 32475936 33546148 1ffdfa4 fileio.exe<br>
801832 14156 32730176 33546164 1ffdfb4 pppd.exe<br>
392908 2508 33150752 33546168 1ffdfb8 capture.exe<br>
249932 1848 33294368 33546148 1ffdfa4 nsecs.exe<br>
372320 2164 33171680 33546164 1ffdfb4 paranoia.exe<br>
361148 6980 33178016 33546144 1ffdfa0 cdtest.exe<br>
222004 1760 33322400 33546164 1ffdfb4 base_sp.exe<br>
222812 1772 33321568 33546152 1ffdfa8 unlimited.exe<br>
229764 1704 33314688 33546156 1ffdfac hello.exe<br>
515572 6576 33024000 33546148 1ffdfa4 loopback.exe<br>
<br>
---<br>
<br>
c/src/lib/libbsp/or1k/generic_or1k/make/custom/generic_or1k.cfg | 3 +++<br>
1 file changed, 3 insertions(+)<br>
<br>
diff --git a/c/src/lib/libbsp/or1k/generic_or1k/make/custom/generic_or1k.cfg b/c/src/lib/libbsp/or1k/generic_or1k/make/custom/generic_or1k.cfg<br>
index fff00ae..9a00643 100644<br>
--- a/c/src/lib/libbsp/or1k/generic_or1k/make/custom/generic_or1k.cfg<br>
+++ b/c/src/lib/libbsp/or1k/generic_or1k/make/custom/generic_or1k.cfg<br>
@@ -5,3 +5,6 @@ RTEMS_CPU = or1k<br>
CPU_CFLAGS = -O2<br>
<br>
CFLAGS_OPTIMIZE_V ?= -O0 -g<br>
+CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections<br>
+<br>
+LDFLAGS = -Wl,--gc-sections<br>
<br>
_______________________________________________<br>
vc mailing list<br>
<a href="mailto:vc@rtems.org" target="_blank">vc@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/vc" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/vc</a><br>
</blockquote></div></div>