[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 13:46:17 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/test/ELF/avr-reloc.s:80
+# HEX-LABEL: section .DATA:
+# HEX-NEXT:  1e1e000f 00785634 12
+.byte b
----------------
aykevl wrote:
> MaskRay wrote:
> > 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.
> > 
> Sorry, I still don't understand. There is no address `110e4` in the test code that could be removed. The test is independent of the address of the `.DATA` section.
> 
> What change do you suggest?
I have mentioned `{{.*}} 1e1e000f 00785634 12`. See the first comment.

It matches ` 110e4 1e1e000f 00785634 12` and ` 210e4 1e1e000f 00785634 12` and other addresses. For a contributor updating LLD's address assignment algorithm, it is very annoying to update every test.




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