<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 3, 2017 at 3:52 AM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2 May 2017 at 23:59, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
> That's interesting. Usually your code wouldn't be gc'ed because your entire<br>
> code is reachable from _start.<br>
<br>
</span>Baremetal doesn't need a _start.<br>
<span class=""><br>
<br>
> Does your program depend on the feature that, if no -e option is given, the<br>
> linker sets the beginning of the .text section to the entry point address?<br>
<br>
</span>I believe that would help, yes. But there may be linker scripts that<br>
can change that, so you need to be careful.<br></blockquote><div><br></div><div>If you want to do GC, you still need to teach linkers GC root symbols in some way, no? Otherwise, linkers cannot determine if a section is live or not.</div></div></div></div>