reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
# RUN: ld64.lld -arch armv7 %s %p/Inputs/hello-world-armv7.yaml -o %t
# RUN: llvm-nm -m -n %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
...

# CHECK:	(undefined) external _printf (from libSystem)
# CHECK:	(undefined) external dyld_stub_binder (from libSystem)
# CHECK:	{{[0-9a-f]+}} (__TEXT,__text) external [Thumb] _main