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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 31 12:29:43 PST 2022


MaskRay 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
----------------
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`


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

https://reviews.llvm.org/D139807



More information about the llvm-commits mailing list