[PATCH] D78741: [LLD][ELF][AVR] Implement the missing relocation types

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 11 11:09:27 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/test/ELF/avr-reloc.s:17
+# CHECK-NEXT:  ldi     r20, 255
+ldi r20, lo8(a)
+ldi r20, hi8(a)
----------------
aykevl wrote:
> MaskRay wrote:
> > Might be worth adding comments about the exact relocation type used, e.g.
> > 
> > `ldi r20, lo8(a)  # R_AVR_LO8_LDI...`
> Good idea, I'll change this.
Doesn't `# ` work as well?


================
Comment at: lld/test/ELF/avr-reloc.s:80
+# HEX-LABEL: section .DATA:
+# HEX-NEXT:  1e1e000f 00785634 12
+.byte b
----------------
aykevl wrote:
> MaskRay wrote:
> > `{{.*}} 1e1e000f 00785634 12`
> > 
> > The address of .DATA is insignificant and should be omitted.
> What do you mean? The address is not included in the test.
> 
> This is the full output:
> 
> ```
> Contents of section .DATA:
>  110e4 1e1e000f 00785634 12                 .....xV4.
> ```
> 
> I believe `110e4` is the address (not included in the test) while `1e1e000f 00785634 12` is the contents of the section (in hex).
> 
> Or do you mean I should check for the presence of an address using `{{.*}}`?
110e4 as the address is insignificant. If the content is not dependent on the address, omitting 110e4 has the benefit that the test does not need an update if the assigned addresses change.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78741





More information about the llvm-commits mailing list