[PATCH] D139807: [lld][ELF] Support relocation R_AVR_LDS_STS_16 on AVRTiny devices.

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 31 18:41:29 PST 2022


benshi001 marked an inline comment as done.
benshi001 added inline comments.


================
Comment at: lld/test/ELF/avrtiny-reloc.s:2
+; REQUIRES: avr
+; RUN: llvm-mc -filetype=obj -triple=avr -mcpu=attiny10 %s -o %t.o
+; RUN: ld.lld %t.o --defsym=a=0x12345678 --defsym=b=30 -o %t
----------------
MaskRay wrote:
> benshi001 wrote:
> > The reasons why I create a new avrtiny-reloc.s, other than add my tests into the existing avr-reloc.s, are 
> > 1. Some instructions in avr-reloc.s are not supported on avrtiny devices, and the assembler will emit errors.
> > 2. AVRTiny devices have their special relocations which will not be emitted on ordinary avr devices.
> You can use `--defsym` as used by `llvm/test/MC/ELF/relocation-alias.s`
Thanks. I have used `--defsym=tiny=1` to distinguish avr and avrtiny instructions.


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

https://reviews.llvm.org/D139807



More information about the llvm-commits mailing list