]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/core/sectiongroup-simple.objtxt
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / core / sectiongroup-simple.objtxt
1 # RUN: lld -core %s | FileCheck %s
2
3 #
4 # Test that section groups are parsed properly when there is a reference to a
5 # group atom from outside a group.
6 #
7
8 ---
9 defined-atoms:
10   - name:            f1
11     scope:           global
12     type:            code
13     references:
14       - kind:            layout-after
15         target:          anotherfunction
16   - name:            f2
17     scope:           global
18     type:            code
19   - name:            g1
20     scope:           global
21     type:            code
22   - name:            d1
23     scope:           global
24     type:            data
25   - name:            g1
26     scope:           global
27     type:            group-comdat
28     references:
29       - kind:            group-child
30         target:          f1
31       - kind:            group-child
32         target:          f2
33       - kind:            group-child
34         target:          d1
35       - kind:            group-child
36         target:          g1
37   - name:            anotherfunction
38     scope:           global
39     type:            data
40 ---
41 undefined-atoms:
42     - name:              f1
43       can-be-null:       never
44 ...
45
46 #CHECK: defined-atoms:
47 #CHECK:   - name:            g1
48 #CHECK:     ref-name:        [[PARENT:[a-zA-Z\.0-9_]+]]
49 #CHECK:     scope:           global
50 #CHECK:     type:            group-comdat
51 #CHECK:     references:
52 #CHECK:       - kind:            group-child
53 #CHECK:         offset:          0
54 #CHECK:         target:          f1
55 #CHECK:       - kind:            group-child
56 #CHECK:         offset:          0
57 #CHECK:         target:          f2
58 #CHECK:       - kind:            group-child
59 #CHECK:         offset:          0
60 #CHECK:         target:          d1
61 #CHECK:       - kind:            group-child
62 #CHECK:         offset:          0
63 #CHECK:         target:          [[GCHILD:[a-zA-Z\.0-9_]+]]
64 #CHECK:   - name:            f1
65 #CHECK:     scope:           global
66 #CHECK:     references:
67 #CHECK:       - kind:            layout-after
68 #CHECK:         offset:          0
69 #CHECK:         target:          anotherfunction
70 #CHECK:   - name:            f2
71 #CHECK:     scope:           global
72 #CHECK:   - name:            d1
73 #CHECK:     scope:           global
74 #CHECK:     type:            data
75 #CHECK:   - name:            g1
76 #CHECK:     ref-name:        [[GCHILD]]
77 #CHECK:     scope:           global
78 #CHECK:   - name:            anotherfunction
79 #CHECK:     scope:           global
80 #CHECK:     type:            data