1# RUN: ld64.lld.darwinold -arch arm64 %s \
2# RUN: -dylib %p/Inputs/arm64/libSystem.yaml -o %t
3# RUN: llvm-objdump --section-headers %t | FileCheck %s
4
5# Make sure that the GOT relocation from gcc_except_tab to the data
6# is not removed.
7
8--- !native
9defined-atoms:
10  - name:            _main
11    scope:           global
12    content:         [ FD, 7B, BF, A9, FD, 03, 00, 91, FF, 43, 00, D1,
13                       BF, C3, 1F, B8, 00, 00, 00, 94, BF, 03, 00, 91,
14                       FD, 7B, C1, A8, C0, 03, 5F, D6 ]
15    alignment:       4
16  - name:            __ZTSP1A
17    scope:           hidden
18    type:            constant
19    content:         [ 50, 31, 41, 00 ]
20    merge:           as-weak
21  - name:            GCC_except_table0
22    type:            unwind-lsda
23    content:         [ FF, 9B, E7, 80, 00, 03, 5B, 00, 00, 00, 00, 1C,
24                       00, 00, 00, 00, 00, 00, 00, 00, 1C, 00, 00, 00,
25                       18, 00, 00, 00, 84, 00, 00, 00, 03, 40, 00, 00,
26                       00, 10, 00, 00, 00, 94, 00, 00, 00, 03, 60, 00,
27                       00, 00, 20, 00, 00, 00, B4, 00, 00, 00, 05, 80,
28                       00, 00, 00, 68, 00, 00, 00, 00, 00, 00, 00, 00,
29                       E8, 00, 00, 00, 08, 00, 00, 00, 28, 01, 00, 00,
30                       00, F0, 00, 00, 00, 74, 00, 00, 00, 00, 00, 00,
31                       00, 00, 00, 00, 01, 7D, 01, 00, A8, FF, FF, FF ]
32    alignment:       4
33    references:
34      - kind:            delta32ToGOT
35        offset:          104
36        target:          __ZTIP1A
37  - name:            __ZTIP1A
38    scope:           hidden
39    type:            data
40    content:         [ 10, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
41                       00, 00, 00, 80, 00, 00, 00, 00, 00, 00, 00, 00,
42                       00, 00, 00, 00, 00, 00, 00, 00 ]
43    merge:           as-weak
44    alignment:       16
45shared-library-atoms:
46  - name:            dyld_stub_binder
47    load-name:       /usr/lib/libSystem.B.dylib
48    type:            unknown
49...
50
51# Make sure we have a GOT relocation.
52# This could only have come from __gcc_except_tab to __ZTIP1A
53# CHECK: __got