parse-tentative-defs.yaml
2.68 KB
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
# RUN: ld64.lld -arch x86_64 -r -print_atoms %s -o %t | FileCheck %s
#
# Test parsing of tentative definitions, including size, scope, and alignment.
#
#
# int tent4;
# long tent8;
# __attribute__((visibility("hidden"))) int tentHidden;
# __attribute__((aligned(16))) int tent4_16;
# __attribute__((aligned(32))) long tent64_32[8];
#
--- !mach-o
arch: x86_64
file-type: MH_OBJECT
flags: [ MH_SUBSECTIONS_VIA_SYMBOLS ]
has-UUID: false
OS: unknown
sections:
- segment: __TEXT
section: __tex
type: S_REGULAR
attributes: [ S_ATTR_PURE_INSTRUCTIONS ]
address: 0x0000000000000000
undefined-symbols:
- name: _tent4
type: N_UNDF
scope: [ N_EXT ]
desc: 0x0200
value: 0x0000000000000004
- name: _tent4_16
type: N_UNDF
scope: [ N_EXT ]
desc: 0x0400
value: 0x0000000000000004
- name: _tent64_32
type: N_UNDF
scope: [ N_EXT ]
desc: 0x0500
value: 0x0000000000000040
- name: _tent8
type: N_UNDF
scope: [ N_EXT ]
desc: 0x0300
value: 0x0000000000000008
- name: _tentHidden
type: N_UNDF
scope: [ N_EXT, N_PEXT ]
desc: 0x0200
value: 0x0000000000000004
...
# CHECK: defined-atoms:
# CHECK: name: _tent4
# CHECK: scope: global
# CHECK: type: zero-fill
# CHECK: size: 4
# CHECK: merge: as-tentative
# CHECK: alignment: 4
# CHECK: name: _tent4_16
# CHECK: scope: global
# CHECK: type: zero-fill
# CHECK: size: 4
# CHECK: merge: as-tentative
# CHECK: alignment: 16
# CHECK: name: _tent64_32
# CHECK: scope: global
# CHECK: type: zero-fill
# CHECK: size: 64
# CHECK: merge: as-tentative
# CHECK: alignment: 32
# CHECK: name: _tent8
# CHECK: scope: global
# CHECK: type: zero-fill
# CHECK: size: 8
# CHECK: merge: as-tentative
# CHECK: alignment: 8
# CHECK: name: _tentHidden
# CHECK: scope: hidden
# CHECK: type: zero-fill
# CHECK: size: 4
# CHECK: merge: as-tentative
# CHECK: alignment: 4