1# RUN: ld64.lld -arch armv6 %s %p/Inputs/hello-world-armv6.yaml -o %t
2# RUN: llvm-nm -m %t | FileCheck %s
3#
4# Test that armv6 (arm) hello-world can be linked into a mach-o executable
5#
6
7--- !mach-o
8arch:            armv6
9file-type:       MH_OBJECT
10flags:           [ MH_SUBSECTIONS_VIA_SYMBOLS ]
11has-UUID:        false
12OS:              unknown
13sections:
14  - segment:         __TEXT
15    section:         __text
16    type:            S_REGULAR
17    attributes:      [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
18    alignment:       2
19    address:         0x0000000000000000
20    content:         [ 0x80, 0x40, 0x2D, 0xE9, 0x10, 0x00, 0x9F, 0xE5,
21                       0x0D, 0x70, 0xA0, 0xE1, 0x00, 0x00, 0x8F, 0xE0,
22                       0xFA, 0xFF, 0xFF, 0xEB, 0x00, 0x00, 0xA0, 0xE3,
23                       0x80, 0x80, 0xBD, 0xE8, 0x0C, 0x00, 0x00, 0x00 ]
24    relocations:
25      - offset:          0x0000001C
26        scattered:       true
27        type:            ARM_RELOC_SECTDIFF
28        length:          2
29        pc-rel:          false
30        value:           0x00000020
31      - offset:          0x00000000
32        scattered:       true
33        type:            ARM_RELOC_PAIR
34        length:          2
35        pc-rel:          false
36        value:           0x0000000C
37      - offset:          0x00000010
38        type:            ARM_RELOC_BR24
39        length:          2
40        pc-rel:          true
41        extern:          true
42        symbol:          1
43  - segment:         __TEXT
44    section:         __cstring
45    type:            S_CSTRING_LITERALS
46    attributes:      [  ]
47    address:         0x0000000000000020
48    content:         [ 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x0A, 0x00 ]
49global-symbols:
50  - name:            _main
51    type:            N_SECT
52    scope:           [ N_EXT ]
53    sect:            1
54    value:           0x0000000000000000
55undefined-symbols:
56  - name:            _printf
57    type:            N_UNDF
58    scope:           [ N_EXT ]
59    value:           0x0000000000000000
60...
61
62# CHECK:	{{[0-9a-f]+}} (__TEXT,__text) external _main
63# CHECK:	(undefined) external _printf (from libSystem)
64# CHECK:	(undefined) external dyld_stub_binder (from libSystem)
65