[PATCH] D78741: [LLD][ELF][AVR] Implement the missing relocation types

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 16 20:40:40 PDT 2020


dylanmckay added a comment.

>   Good question, I wasn't able to find any document online.
> 
> All the info I've used come from this ISA manual and by feeding some asm into ld to see if the result matched my expectations.

Yes - there is no document I have been able to find either. As you note, the best we can do is compile and dump the sources under AVR-GCC and see that the expectations match up.

This patch is really good, the test coverage is nice too (TIL `--defsym=`).

I will have a deeper review of the specific relocation bitwise expressions for correctness this week.



================
Comment at: lld/test/ELF/avr-reloc.s:7
+
+.section .LDI,"ax", at progbits
+# CHECK-LABEL: section .LDI:
----------------
MaskRay wrote:
> Does AVR use uppercase section names?
Not normally but I suppose this is chosen in frontend code so it is allowed but may not be a section that is understood by an existing AVR ELF program flashing tool. Of course, it says nowhere in The Ten Commandments that every section in the ELF file must be flashed to the final AVR device, so uppercase section names are reasonable in this example.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78741/new/

https://reviews.llvm.org/D78741





More information about the llvm-commits mailing list