<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Wed, May 3, 2017, at 11:51 AM, Rui Ueyama wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div><div defang_data-gmailquote="yes"><div>On Wed, May 3, 2017 at 3:52 AM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>></span> wrote:<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div><span>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.</div>
<div> <span><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</div>
<div> can change that, so you need to be careful.<br></div>
</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.<br></div>
</div>
</div>
</div>
</blockquote><div><br></div>
<div>Yeah totally. I had marked some sections as used previously but haven't had a chance to look further into it. I'll try to take some time this weekend to poke at it further.<br></div>
<div><br></div>
<div>The project I'm working on is here: <a href="https://github.com/tannewt/circuitpython/tree/clang/atmel-samd">https://github.com/tannewt/circuitpython/tree/clang/atmel-samd</a> in case you can't wait.<br></div>
<div>Thanks,<br></div>
<div>Scott<br></div>
</body>
</html>