1# RUN: ld64.lld -arch armv7 %s %p/Inputs/hello-world-armv7.yaml -o %t 2# RUN: llvm-nm -m -n %t | FileCheck %s 3# 4# Test that armv7 (thumb) hello-world can be linked into a mach-o executable 5# 6 7--- !mach-o 8arch: armv7 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, 0xB5, 0x40, 0xF2, 0x06, 0x00, 0x6F, 0x46, 21 0xC0, 0xF2, 0x00, 0x00, 0x78, 0x44, 0xFF, 0xF7, 22 0xF8, 0xEF, 0x00, 0x20, 0x80, 0xBD ] 23 relocations: 24 - offset: 0x0000000E 25 type: ARM_THUMB_RELOC_BR22 26 length: 2 27 pc-rel: true 28 extern: true 29 symbol: 1 30 - offset: 0x00000008 31 scattered: true 32 type: ARM_RELOC_HALF_SECTDIFF 33 length: 3 34 pc-rel: false 35 value: 0x00000016 36 - offset: 0x00000006 37 scattered: true 38 type: ARM_RELOC_PAIR 39 length: 3 40 pc-rel: false 41 value: 0x0000000C 42 - offset: 0x00000002 43 scattered: true 44 type: ARM_RELOC_HALF_SECTDIFF 45 length: 2 46 pc-rel: false 47 value: 0x00000016 48 - offset: 0x00000000 49 scattered: true 50 type: ARM_RELOC_PAIR 51 length: 2 52 pc-rel: false 53 value: 0x0000000C 54 - segment: __TEXT 55 section: __cstring 56 type: S_CSTRING_LITERALS 57 attributes: [ ] 58 address: 0x0000000000000016 59 content: [ 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x0A, 0x00 ] 60global-symbols: 61 - name: _main 62 type: N_SECT 63 scope: [ N_EXT ] 64 sect: 1 65 desc: [ N_ARM_THUMB_DEF ] 66 value: 0x0000000000000000 67undefined-symbols: 68 - name: _printf 69 type: N_UNDF 70 scope: [ N_EXT ] 71 value: 0x0000000000000000 72... 73 74# CHECK: (undefined) external _printf (from libSystem) 75# CHECK: (undefined) external dyld_stub_binder (from libSystem) 76# CHECK: {{[0-9a-f]+}} (__TEXT,__text) external [Thumb] _main 77