<commit_before>; RUN: llvm-mc -triple arm64-apple-darwin -filetype=obj -o - %s | macho-dump | FileCheck %s

foo:
  .long 0
bar:
  .long 1

baz:
  .byte foo - bar
  .short foo - bar

; CHECK: # Relocation 0
; CHECK: (('word-0', 0x9),
; CHECK:  ('word-1', 0x1a000002)),
; CHECK: # Relocation 1
; CHECK: (('word-0', 0x9),
; CHECK:  ('word-1', 0xa000001)),
; CHECK: # Relocation 2
; CHECK: (('word-0', 0x8),
; CHECK:  ('word-1', 0x18000002)),
; CHECK: # Relocation 3
; CHECK: (('word-0', 0x8),
; CHECK:  ('word-1', 0x8000001)),
<commit_msg>[tests] Use llvm-readobj instead of macho-dump.<commit_after>; RUN: llvm-mc -triple arm64-apple-darwin -filetype=obj -o - %s | llvm-readobj -r | FileCheck %s

foo:
  .long 0
bar:
  .long 1

baz:
  .byte foo - bar
  .short foo - bar

; CHECK: File: <stdin>
; CHECK: Format: Mach-O arm64
; CHECK: Arch: aarch64
; CHECK: AddressSize: 64bit
; CHECK: Relocations [
; CHECK:  Section __text {
; CHECK:    0x9 0 1 1 ARM64_RELOC_SUBTRACTOR 0 bar
; CHECK:    0x9 0 1 1 ARM64_RELOC_UNSIGNED 0 foo
; CHECK:    0x8 0 0 1 ARM64_RELOC_SUBTRACTOR 0 bar
; CHECK:    0x8 0 0 1 ARM64_RELOC_UNSIGNED 0 foo
; CHECK:  }
; CHECK: ]
{'fraction_non_alphanumeric': 0.1633187772925764, 'fraction_numerical': 0.08558951965065502, 'mean_word_length': 3.3245283018867924, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5819358', 'n_tokens_mistral': 547, 'n_tokens_neox': 483, 'n_words': 142}