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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 02:45:27 PDT 2017


grimar added a comment.

In https://reviews.llvm.org/D32991#753006, @xiangzhai wrote:

> Dear George,
>
> One more question, I have to gotta home :) why the Type of relocation by avr-gcc and `clang --target=avr` is different?
>
>   readelf -r avr-gcc-BareMinimum.o
>  
>   Relocation section '.rela.text' at offset 0x1d0 contains 2 entries:
>    Offset     Info    Type            Sym.Value  Sym. Name + Addend
>   00000000  00000d03 R_AVR_13_PCREL    00000000   bar + 0
>   00000002  00000e03 R_AVR_13_PCREL    00000000   foo + 0
>                      ^----- see
>
>
> and
>
>   readelf -r clang-BareMinimum.o
>  
>   Relocation section '.rela.text' at offset 0xb8 contains 2 entries:
>    Offset     Info    Type            Sym.Value  Sym. Name + Addend
>   00000000  00000212 R_AVR_CALL        00000000   bar + 0
>   00000004  00000312 R_AVR_CALL        00000000   foo + 0
>                       ^----- see
>
>
> Is the bug of LLVM's AVR target?
>
> Regards,
>  Leslie Zhai


Honestly I don't know, I know nothing avout AVR. But I don't think it is a bug.
I guess you can try to link both object with a known workable avr linker and should be able to run them without problems. 
Looks compilers just produce different relocations because of different code they produce probably,


Repository:
  rL LLVM

https://reviews.llvm.org/D32991





More information about the llvm-commits mailing list