<div dir="ltr">Replied from the wrong email address and it didn't go to the list. :(<br><br>Besides this is a longer reply with a reference to a spreadsheet with size data for when I turned this on for the sparc BSPs.<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 3, 2016 at 6:24 PM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 12/27/15 02:39, Joel Sherrill wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I noticed in a build of all BSPs that a number have trouble<br>
linking some of the larger tests. Rather than add them to<br>
the tcfg files, is it time to turn on per-function/data item<br>
linking to all the BSPs?<br>
</blockquote>
<br></span>
Does this work for architectures?<br>
<br></blockquote><div><p dir="ltr" style="font-size:12.8px">Technically I have no idea. But I think so since this should be a generic binutils/ld feature. If it doesn't work on a particular architecture, that would be a tools bug to report upstream. And we obviously wouldn't use it on that architecture.</p><p dir="ltr" style="font-size:12.8px">> For C++ this makes sense but does it for C? </p><p style="font-size:12.8px">Yep. C++ really needs this.</p><p dir="ltr" style="font-size:12.8px">> We have worked hard to break down our code into small pieces to ensure we link only what is needed. My concern is per-function linking relaxes this but it is important?. It becomes difficult to avoid doing this if it is supported by an architecture because it works on all code including 3rd party libraries which is a huge win.</p><p dir="ltr" style="font-size:12.8px">When I experimented with doing this on the SPARC BSPs, I saw a large drop in test executable sizes drop about 50% on average. So it does make difference on C, I found the spreadsheet I built for SPARC/SIS with and without using the per function and data item sections. I apparently did this in April 2013.</p><p dir="ltr" style=""><span style="font-size:12.8px"><a href="https://docs.google.com/spreadsheets/d/1XHCUqo6EJC08cKS4EgIRyAGabAhDr-7QbJbhQpVVooc/edit?usp=sharing">https://docs.google.com/spreadsheets/d/1XHCUqo6EJC08cKS4EgIRyAGabAhDr-7QbJbhQpVVooc/edit?usp=sharing</a></span><br></p></div><div>It looked like the tests were regularly 45-50% smaller. Even minimum dropped. </div><div><br></div><div>Overall, I was quite shocked at how effective it was. I really wanted to sweep it across all then. But I am a bit concerned that it breaks something. I am now more cynical. If we break it and someone reports it, we know of a user. If no one ever says anything, then we either didn't break it or no one is using it. Either way, it is information and a point in time we can use as a reference for future deprecation of BSPs.</div><div><br></div><div><br></div><div>--joel </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><font color="#888888">Chris<br>
</font></span></blockquote></div><br></div></div>