[PATCH] D106767: [lld/mac] Add support for segment$start$ and segment$end$ symbols

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 25 15:29:26 PDT 2021


thakis added inline comments.


================
Comment at: lld/test/MachO/start-end.s:189-198
+# SEG-NOT: segment$start$__TEXT
+# SEG-NOT: segment$end$__TEXT
+# SEG-NOT: segment$start$__FOO
+# SEG-NOT: segment$end$__FOO
+# SEG-NOT: segment$start$__BAZ
+# SEG-NOT: segment$end$__BAZ
+# SEG-NOT: segment$start$__WHAT
----------------
int3 wrote:
> maybe `--implicit-check-not=segment$` would be terser?
It tests a lot of output. With `--implicit-check-not=segment$` it's not always clear where it's supposed to not match when there's a lot of output.


================
Comment at: lld/test/MachO/start-end.s:399-409
+  # (These two lines make ld64 crash linking the .o file.
+  # The rest of the test works with ld64 too.)
+  movq segment$start$__WHAT at GOTPCREL(%rip), %rax
+  movq segment$end$__WHAT at GOTPCREL(%rip), %rbx
+
+  # References to non-existing segments create that segment,
+  # without any sections in it.
----------------
int3 wrote:
> nit: standardize whether we are using # or ##
Done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106767



More information about the llvm-commits mailing list