[PATCH] D125544: [lld][ELF] Support linking 'elf32-avr' with linker scripts
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 14 07:27:37 PDT 2022
benshi001 marked 2 inline comments as done.
benshi001 added inline comments.
================
Comment at: lld/test/ELF/linkerscript/Inputs/avr5.s:5
+_start:
+ ldi r24, 10
+ ldi r25, 20
----------------
MaskRay wrote:
> These instructions are not meaningful to ld. One single `rjmp _start` is sufficient testing a relocation.
Unfortunately `rjmp` can not be decoded correctly by llvm-objdump, due to bugs in AVR Disassembler (But GNU's avr-bjdump can). Currently I have to use `LDI`, which load an int8 immediate to a register.
================
Comment at: lld/test/ELF/linkerscript/avr5.test:24
+SECTIONS {
+ . = 0;
+ .text : { *(.text*) }
----------------
MaskRay wrote:
> benshi001 wrote:
> > `AVR` is harward CPU, it is common that program memory and data memory are isolated to two different regions.
> Is it common to start at zero address?
Yes. Most devices reset to `PC = 0`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125544/new/
https://reviews.llvm.org/D125544
More information about the llvm-commits
mailing list