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
# RUN: ld64.lld -arch armv7 %s -r -print_atoms -o %t | FileCheck %s
#
# Test that assembly written without .subsections_via_symbols is parsed so
# that atoms are non-dead-strip and there is a layout-after references
# chaining atoms together.
#

--- !mach-o
arch:            armv7
file-type:       MH_OBJECT
flags:           [  ]
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:         [ 0x04, 0x10, 0x9F, 0xE5, 0x04, 0x20, 0x9F, 0xE5,
                       0x1E, 0xFF, 0x2F, 0xE1, 0x78, 0x56, 0x34, 0x12,
                       0x21, 0x43, 0x65, 0x87 ]
local-symbols:
  - name:            constants1
    type:            N_SECT
    sect:            1
    value:           0x000000000000000C
  - name:            constants2
    type:            N_SECT
    sect:            1
    value:           0x0000000000000010
global-symbols:
  - name:            _foo
    type:            N_SECT
    scope:           [ N_EXT ]
    sect:            1
    value:           0x0000000000000000
...


# CHECK:defined-atoms:
# CHECK:  - name:            _foo
# CHECK:    scope:           global
# CHECK:    content:         [ 04, 10, 9F, E5, 04, 20, 9F, E5, 1E, FF, 2F, E1 ]
# CHECK:    dead-strip:      never
# CHECK:    references:
# CHECK:      - kind:            layout-after
# CHECK:        offset:          0
# CHECK:        target:          constants1
# CHECK:  - name:            constants1
# CHECK:    content:         [ 78, 56, 34, 12 ]
# CHECK:    dead-strip:      never
# CHECK:    references:
# CHECK:      - kind:            layout-after
# CHECK:        offset:          0
# CHECK:        target:          constants2
# CHECK:  - name:            constants2
# CHECK:    content:         [ 21, 43, 65, 87 ]
# CHECK:    dead-strip:      never