[PATCH] D76575: [LLD][ELF][ARM] Replace assembler files with yaml

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 02:10:41 PDT 2020


grimar added a comment.

I think it is fine. When llvm-mc can't be used it is a job for yaml2obj.

I've investigated one of the test cases and put few comments about excessive YAML parts mostly.
These comments seems are general and can be applied to other tests added as well.



================
Comment at: lld/test/ELF/arm-thumb-adr-err.test:40
+  Machine:         EM_ARM
+  Flags:           [ EF_ARM_EABI_VER5 ]
+Sections:
----------------
Seems you do not need `Flags`.


================
Comment at: lld/test/ELF/arm-thumb-adr-err.test:45
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    AddressAlign:    0x0000000000000004
+  - Name:            .text.0
----------------
And `AddressAlign` too (and in other places).


================
Comment at: lld/test/ELF/arm-thumb-adr-err.test:79
+    AddressAlign:    0x0000000000000001
+    Size:            1020
+  - Name:            .text.4
----------------
I'd add a comment for such magic values, it is unclear why `1020` and not `1019` fo example?


================
Comment at: lld/test/ELF/arm-thumb-adr-err.test:88
+    AddressAlign:    0x0000000000000001
+    Content:         4119000000616561626900010F000000060C074D080009012200
+Symbols:
----------------
Doesn't seem you need `.ARM.attributes` section?

(Side note: seems we might want to teach yaml2obj about `SHT_ARM_ATTRIBUTES`..)


================
Comment at: lld/test/ELF/arm-thumb-adr-err.test:107
+
+# CHECK: {{.*}}.o:(.text.1+0x0): relocation R_ARM_THM_PC8 out of range: 18446744073709551612 is not in [0, 1023]
+# CHECK: {{.*}}.o:(.text.1+0x2): improper alignment for relocation R_ARM_THM_PC8: 0x2 is not aligned to 4 bytes
----------------
I'd suggest to move `CHECK` lines right below the line with `FileCheck %s`.


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

https://reviews.llvm.org/D76575





More information about the llvm-commits mailing list