[PATCH] D32991: [ELF] Initial migration of AVR target

Dylan McKay via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 16:26:16 PDT 2017


Hey Rui,

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.

> 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?

We only want/need to support bare-bone programs. Obviously that means that
there is no dynamic linker, which answers your question.

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.

> 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?

No PLT/GOT stuff at all.

On Wed, May 10, 2017 at 6:09 AM, Rui Ueyama <ruiu at google.com> wrote:

> On Tue, May 9, 2017 at 1:01 AM, Leslie Zhai via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> xiangzhai added a comment.
>>
>> Dear Rui,
>>
>> > What is your eventual goal for AVR support?
>>
>> 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 <
>> https://github.com/avr-llvm/lld> for test-the-waters at the very
>> beginning, it is a long journey.
>
>
> 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?
>
> 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?
>
> > This patch is too small that we cannot test.
>>
>> 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 <https://reviews.llvm.org/D31528#715906> anyway thanks for
>> your suggestion!
>>
>> Regards,
>> Leslie Zhai
>>
>>
>> Repository:
>>   rL LLVM
>>
>> https://reviews.llvm.org/D32991
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170510/48e78e76/attachment.html>


More information about the llvm-commits mailing list