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

Dylan McKay via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 22:56:17 PDT 2017


dylanmckay added a comment.

I also agree that this is not an AVR-LLVM bug, it is simply that LLVM and GCC are selecting different instructions and lowering different relocations. There is no expectation that program X has the exact same relocations across different compilers.

I think it's good that you've only implemented `R_AVR_32` because once this has landed, we should factor out the fixup application code in `AVRAsmBackend.cpp` and reuse it from `lld`.

So far as automated tests go, I think that we should be fine if we have a single test case to check that we can link an AVR executable with no relocations. This would verify that `--target avr` works okay. On top of that, we should also have a test for the `R_AVR_32` relocation.

I'm not entirely sure what LLD tests look like, but if it's anything like LLVM tests, it will be quite straightforward to figure out from looking at existing files in the `tests/` directory.

Nice work by the way!


Repository:
  rL LLVM

https://reviews.llvm.org/D32991





More information about the llvm-commits mailing list