[PATCH] D147364: [lld][ELF] Support relocations R_AVR_LO8_LDI_GS/R_AVR_HI8_LDI_GS

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 15:02:56 PDT 2023


MaskRay added inline comments.


================
Comment at: lld/test/ELF/avr-thunk.s:1
+; REQUIRES: avr
+; RUN: llvm-mc -filetype=obj -triple=avr -mcpu=atmega2560 %s -o %t.o
----------------
If there can be other thunks, I'd suggest a filename with more information, e.g. `avr-thunk-ldi-gs.s`



================
Comment at: lld/test/ELF/avr-thunk.s:8
+
+;; CHECK:       000110b4 <__AVRThunk_b>:
+;; CHECK-NEXT:    jmp   0x20000
----------------
```
; CHECK-LABEL: <__AVRThunk_b>:
; CHECK-NEXT:   000110b4 jmp 0x20000
```
(Then use `llvm-objdump ... --no-show-raw-insn`

This idea is that `<__AVRThunk_b>` will always match. If the address changes, the `NEXT:` pattern ensures that FileCheck can locate the exact failure line. Technically such issues can be fixed by a sufficiently smart auto tool.

`000110b4 <__AVRThunk_b>:` may not give FileCheck sufficient information to locate a line.


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

https://reviews.llvm.org/D147364



More information about the llvm-commits mailing list