<div dir="ltr">Hey Rui,<div><br></div><div>You are correct in that we never run ELF files directly on the AVR - we copy the text and data sections out of the linked ELF file and flash them directly to the chip.</div><div><br></div><div>> <span style="font-size:12.8px">For example, do you want to support just bare-bone programs? Or ,do you want to eventually create a Unix-like OS on AVR which supports dynamic linking? Or something else?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">We only want/need to support bare-bone programs. Obviously that means that there is no dynamic linker, which answers your question.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">When I originally implemented AVR support from LLD, by far the biggest component that I needed to write was the AVR-specific relocation handling code. I was able to link program successfully, and I am fairly certain that we don't need anything more complex than that.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">> </span><span style="font-size:12.8px">Naturally you don't use dynamic linking, which means most ELF features, such as PLT/GOT, are not used for AVR. Is this my understanding correct?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">No PLT/GOT stuff at all.</span></div><div class="gmail-yj6qo gmail-ajU" style="font-size:12.8px"></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 10, 2017 at 6:09 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, May 9, 2017 at 1:01 AM, Leslie Zhai via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_4595569167526832998m_4793158196870446766m_1567314211086885277gmail-">xiangzhai added a comment.<br>
<br>
Dear Rui,<br>
<br>
</span><span class="m_4595569167526832998m_4793158196870446766m_1567314211086885277gmail-">> What is your eventual goal for AVR support?<br>
<br>
</span>Like you mentioned the goal is one that can link a program that does nothing but is still valid, so I just try to migrate Dylan's fork <<a href="https://github.com/avr-llvm/lld" rel="noreferrer" target="_blank">https://github.com/avr-llvm/l<wbr>ld</a>> for test-the-waters at the very beginning, it is a long journey.</blockquote><div><br></div></span><div>I was asking about your ultimate goal of AVR support in LLD, not the goal of this particular patch. After a long journey, what do you think LLD AVR support will be able to do?</div><div><br></div><div>Sorry for my negligence, but I don't really know much about AVR and the Dylan's fork. So I wanted to know the whole picture of AVR support. For example, do you want to support just bare-bone programs? Or ,do you want to eventually create a Unix-like OS on AVR which supports dynamic linking? Or something else?<br></div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_4595569167526832998m_4793158196870446766m_1567314211086885277gmail-">
> This patch is too small that we cannot test.<br>
<br>
</span>Yes, it is just a bare-bones AVRTargetInfo to check whether or not I drove in the wrong direction, and you are my mentor :) you can always find the key point <<a href="https://reviews.llvm.org/D31528#715906" rel="noreferrer" target="_blank">https://reviews.llvm.org/D315<wbr>28#715906</a>> anyway thanks for your suggestion!<br>
<div class="m_4595569167526832998m_4793158196870446766m_1567314211086885277gmail-HOEnZb"><div class="m_4595569167526832998m_4793158196870446766m_1567314211086885277gmail-h5"><br>
Regards,<br>
Leslie Zhai<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D32991" rel="noreferrer" target="_blank">https://reviews.llvm.org/D3299<wbr>1</a><br>
<br>
<br>
<br>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div>