[PATCH] D97104: [lld-macho] Add test for a variety of arm64 relocations

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 12:57:40 PST 2021


int3 added inline comments.


================
Comment at: lld/test/MachO/arm64-relocs.s:4
+# RUN: %lld -dylib -arch arm64 -lSystem -o %t %t.o
+# RUN: (llvm-objdump --syms %t; llvm-objdump --macho -d --section=__const %t) | FileCheck %s
+
----------------
alexshap wrote:
> wouldn't llvm-objdump --syms --macho -d --section=__const %t be sufficient ? (+ reordering the checks)
I find it more natural to have the symbol table first, since everything is defined exactly once there. If OTOH the `__const` data was first, then we would have the first matching line defining BAZ and the second line checking that the value matches, which seems kind of misleading when we're really matching on the same output


================
Comment at: lld/test/MachO/arm64-relocs.s:19-20
+# CHECK-LABEL: Contents of (__DATA_CONST,__const) section
+# CHECK:       [[#PTR_1]]	{{0*}}[[#BAZ]] 00000000 00000000 00000000
+# CHECK:       [[#PTR_2]]	{{0*}}[[#BAZ]] 00000000 00000000 00000000
+
----------------
(the comment above was talking about these two lines in particular)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97104



More information about the llvm-commits mailing list