aboutsummaryrefslogtreecommitdiff
path: root/lld/test/mach-o/unwind-info-simple-x86_64.yaml
blob: a4efed385f652f80075988379d626de2acbef01f (plain)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# RUN: ld64.lld -arch x86_64 %s -o %t -e _main %p/Inputs/x86_64/libSystem.yaml
# RUN: llvm-objdump --unwind-info %t | FileCheck %s

# CHECK: Contents of __unwind_info section:
# CHECK:   Version:                                   0x1
# CHECK:   Common encodings array section offset:     0x1c
# CHECK:   Number of common encodings in array:       0x0
# CHECK:   Personality function array section offset: 0x1c
# CHECK:   Number of personality functions in array:  0x1
# CHECK:   Index array section offset:                0x20
# CHECK:   Number of indices in array:                0x2
# CHECK:   Common encodings: (count = 0)
# CHECK:   Personality functions: (count = 1)
# CHECK:     personality[1]: 0x00001000
# CHECK:   Top level indices: (count = 2)
# CHECK:     [0]: function offset=0x00000efb, 2nd level page offset=0x00000040, LSDA offset=0x00000038
# CHECK:     [1]: function offset=0x00000f00, 2nd level page offset=0x00000000, LSDA offset=0x00000040
# CHECK:   LSDA descriptors:
# CHECK:     [0]: function offset=0x00000efb, LSDA offset=0x00000f00
# CHECK:   Second level indices:
# CHECK:     Second level index[0]: offset in section=0x00000040, base function offset=0x00000efb
# CHECK:       [0]: function offset=0x00000efb, encoding=0x51000000
# CHECK:       [1]: function offset=0x00000efc, encoding=0x01000000
# CHECK:       [2]: function offset=0x00000efd, encoding=0x04000018
# CHECK:       [3]: function offset=0x00000efe, encoding=0x04000040
# CHECK:       [4]: function offset=0x00000eff, encoding=0x00000000
# CHECK-NOT: Contents of __compact_unwind section

--- !native
path:            '<linker-internal>'
defined-atoms:
  - name:            GCC_except_table1
    type:            unwind-lsda
    content:         [ FF, 9B, A2, 80, 80, 00, 03, 1A, 08, 00, 00, 00,
                       05, 00, 00, 00, 1A, 00, 00, 00, 01, 0D, 00, 00,
                       00, 64, 00, 00, 00, 00, 00, 00, 00, 00, 01, 00,
                       04, 00, 00, 00 ]
  - type:            compact-unwind
    content:         [ 40, 00, 00, 00, 00, 00, 00, 00, 01, 00, 00, 00,
                       00, 00, 00, 41, 00, 00, 00, 00, 00, 00, 00, 00,
                       E0, 00, 00, 00, 00, 00, 00, 00 ]
    references:
      - kind:            pointer64Anon
        offset:          0
        target:          __Z3barv
      - kind:            pointer64
        offset:          16
        target:          ___gxx_personality_v0
      - kind:            pointer64Anon
        offset:          24
        target:          GCC_except_table1
  - type:            compact-unwind
    content:         [ C0, 00, 00, 00, 00, 00, 00, 00, 01, 00, 00, 00,
                       00, 00, 00, 01, 00, 00, 00, 00, 00, 00, 00, 00,
                       00, 00, 00, 00, 00, 00, 00, 00 ]
    references:
      - kind:            pointer64Anon
        offset:          0
        target:          _main
  - type:            compact-unwind
    content:         [ C1, 00, 00, 00, 00, 00, 00, 00, 01, 00, 00, 00,
                       00, 00, 00, 04, 00, 00, 00, 00, 00, 00, 00, 00,
                       00, 00, 00, 00, 00, 00, 00, 00 ]
    references:
      - kind:            pointer64Anon
        offset:          0
        target:          _needsDwarfButNoCompactUnwind

# Generic x86_64 CIE:
  - name:            LCIE
    type:            unwind-cfi
    content:         [ 14, 00, 00, 00, 00, 00, 00, 00, 01, 7A, 52, 00,
                       01, 78, 10, 01, 10, 0C, 07, 08, 90, 01, 00, 00 ]

  - type:            unwind-cfi
    content:         [ 24, 00, 00, 00, 1C, 00, 00, 00, C8, FE, FF, FF,
                       FF, FF, FF, FF, 01, 00, 00, 00, 00, 00, 00, 00,
                       00, 41, 0E, 10, 86, 02, 43, 0D, 06, 00, 00, 00,
                       00, 00, 00, 00 ]
    references:
      - kind:            unwindFDEToFunction
        offset:          8
        target:          _needsDwarfButNoCompactUnwind
      - kind:            negDelta32
        offset:          4
        target:          LCIE

  - type:            unwind-cfi
    content:         [ 24, 00, 00, 00, 44, 00, 00, 00, C8, FE, FF, FF,
                       FF, FF, FF, FF, 01, 00, 00, 00, 00, 00, 00, 00,
                       00, 41, 0E, 10, 86, 02, 43, 0D, 06, 00, 00, 00,
                       00, 00, 00, 00 ]
    references:
      - kind:            unwindFDEToFunction
        offset:          8
        target:          _needsDwarfSaysCompactUnwind
      - kind:            negDelta32
        offset:          4
        target:          LCIE

  - type:            unwind-cfi
    content:         [ 24, 00, 00, 00, 6C, 00, 00, 00, C8, FE, FF, FF,
                       FF, FF, FF, FF, 01, 00, 00, 00, 00, 00, 00, 00,
                       00, 41, 0E, 10, 86, 02, 43, 0D, 06, 00, 00, 00,
                       00, 00, 00, 00 ]
    references:
      - kind:            unwindFDEToFunction
        offset:          8
        target:          _main
      - kind:            negDelta32
        offset:          4
        target:          LCIE

  - name:            __Z3barv
    scope:           global
    content:         [ C3 ]
  - name:            _main
    scope:           global
    content:         [ C3 ]
  - name:            _needsDwarfButNoCompactUnwind
    scope:           global
    content:         [ C3 ]
  - name:            _needsDwarfSaysCompactUnwind
    scope:           global
    content:         [ C3 ]
  - name:            _noUnwindData
    scope:           global
    content:         [ C3 ]

shared-library-atoms:
  - name:            ___gxx_personality_v0
    load-name:       '/usr/lib/libc++abi.dylib'
    type:            unknown