[PATCH] D125544: [lld][ELF] Support linking 'elf32-avr' with linker scripts
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 23:13:37 PDT 2022
MaskRay added inline comments.
================
Comment at: lld/ELF/ScriptParser.cpp:439
.Case("elf32-msp430", {ELF32LEKind, EM_MSP430})
+ .Case("elf32-avr", {ELF32LEKind, EM_AVR})
.Default({ELFNoneKind, EM_NONE});
----------------
move this after EM_386
================
Comment at: lld/test/ELF/linkerscript/Inputs/avr5.s:5
+_start:
+ ldi r24, 10
+ ldi r25, 20
----------------
These instructions are not meaningful to ld. One single `rjmp _start` is sufficient testing a relocation.
================
Comment at: lld/test/ELF/linkerscript/avr5.test:2
+# REQUIRES: avr
+
+# RUN: llvm-mc -filetype=obj -triple=avr -mattr=+avr5 %p/Inputs/avr5.s -o %t
----------------
Use split-file
================
Comment at: lld/test/ELF/linkerscript/avr5.test:24
+SECTIONS {
+ . = 0;
+ .text : { *(.text*) }
----------------
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?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125544/new/
https://reviews.llvm.org/D125544
More information about the llvm-commits
mailing list