llvm-project/lld/test/mach-o/hello-world-armv7.yaml

104 lines
3.1 KiB
YAML

# RUN: lld -flavor darwin -arch armv7 -ios_version_min 7.0 %s -o %t && \
# RUN: llvm-nm %t | FileCheck %s
#
# Test that armv7 (thumb) hello-world can be linked into a mach-o executable
#
--- !mach-o
arch: armv7
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
has-UUID: false
OS: unknown
sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
alignment: 2
address: 0x0000000000000000
content: [ 0x80, 0xB5, 0x40, 0xF2, 0x06, 0x00, 0x6F, 0x46,
0xC0, 0xF2, 0x00, 0x00, 0x78, 0x44, 0xFF, 0xF7,
0xF8, 0xEF, 0x00, 0x20, 0x80, 0xBD ]
relocations:
- offset: 0x0000000E
type: ARM_THUMB_RELOC_BR22
length: 2
pc-rel: true
extern: true
symbol: 1
- offset: 0x00000008
scattered: true
type: ARM_RELOC_HALF_SECTDIFF
length: 3
pc-rel: false
value: 0x00000016
- offset: 0x00000006
scattered: true
type: ARM_RELOC_PAIR
length: 3
pc-rel: false
value: 0x0000000C
- offset: 0x00000002
scattered: true
type: ARM_RELOC_HALF_SECTDIFF
length: 2
pc-rel: false
value: 0x00000016
- offset: 0x00000000
scattered: true
type: ARM_RELOC_PAIR
length: 2
pc-rel: false
value: 0x0000000C
- segment: __TEXT
section: __cstring
type: S_CSTRING_LITERALS
attributes: [ ]
address: 0x0000000000000016
content: [ 0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x0A, 0x00 ]
global-symbols:
- name: _main
type: N_SECT
scope: [ N_EXT ]
sect: 1
desc: [ N_ARM_THUMB_DEF ]
value: 0x0000000000000000
undefined-symbols:
- name: _printf
type: N_UNDF
scope: [ N_EXT ]
value: 0x0000000000000000
...
--- !mach-o
arch: armv7
file-type: MH_DYLIB
flags: [ ]
install-name: /usr/lib/libSystem.B.dylib
sections:
- segment: __TEXT
section: __text
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS, S_ATTR_SOME_INSTRUCTIONS ]
address: 0x0000000000000000
content: [ 0x55 ]
global-symbols:
- name: _printf
type: N_SECT
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000001
- name: dyld_stub_binder
type: N_SECT
scope: [ N_EXT ]
sect: 1
value: 0x0000000000000001
...
# CHECK: {{[0-9a-f]+}} T _main
# CHECK: U _printf
# CHECK: U dyld_stub_binder