[PATCH] D78741: [LLD][ELF][AVR] Implement the missing relocation types
Dylan McKay via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 31 05:19:11 PDT 2020
dylanmckay added a comment.
I've checked over all of the relocation logic, cross referenced with both the AVR ISA manual and the AVR LLVM fixture implementations in AVRAsmBackend.cpp - everything looks consistent to me.
Nice patch!
I think there are a few missing `check[U]Int` calls (I've left couple comments comments) but other than that, everything looks good from an AVR perspective.
================
Comment at: lld/ELF/Arch/AVR.cpp:97
+ case R_AVR_LO8_LDI_NEG:
+ writeLDI(loc, (~val + 1) & 0xff);
+ break;
----------------
missing `checkUInt(loc, val, 8, rel)`
================
Comment at: lld/ELF/Arch/AVR.cpp:103
+ case R_AVR_HI8_LDI_NEG:
+ writeLDI(loc, ((~val + 1) >> 8) & 0xff);
+ break;
----------------
I suspect all of these remaining cases can/should have `checkUInt(loc, val, N, rel)` calls
================
Comment at: lld/ELF/Arch/AVR.cpp:157
+ // Since every jump destination is word aligned we gain an extra bit
+ case R_AVR_7_PCREL: {
+ checkAlignment(loc, val, 2, rel);
----------------
Missing `checkInt`?
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