]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/core/sectiongroup-remaining-undef.objtxt
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / core / sectiongroup-remaining-undef.objtxt
1 # RUN: lld -core %s | FileCheck %s
2
3 #
4 # Test that section groups are parsed and the first group selected for symbol
5 # resolution. The second file which has the same group has a unresolved
6 # undefined symbol. lets make sure that the symbol is kept around in the final
7 # link and remains undefined.
8 #
9
10 ---
11 defined-atoms:
12   - name:            f1
13     scope:           global
14     type:            code
15   - name:            f2
16     scope:           global
17     type:            code
18   - name:            g1
19     scope:           global
20     type:            code
21   - name:            d1
22     scope:           global
23     type:            data
24   - name:            g1
25     scope:           global
26     type:            group-comdat
27     references:
28       - kind:            group-child
29         target:          f1
30       - kind:            group-child
31         target:          f2
32       - kind:            group-child
33         target:          g1
34       - kind:            group-child
35         target:          d1
36 ---
37 defined-atoms:
38   - name:            anotherfunction
39     scope:           global
40     type:            data
41   - name:            f1
42     scope:           global
43     type:            code
44   - name:            f2
45     scope:           global
46     type:            code
47   - name:            f3
48     scope:           global
49     type:            code
50   - name:            g1
51     scope:           global
52     type:            code
53   - name:            d1
54     scope:           global
55     type:            data
56   - name:            g1
57     scope:           global
58     type:            group-comdat
59     references:
60       - kind:            group-child
61         target:          f1
62       - kind:            group-child
63         target:          f2
64       - kind:            group-child
65         target:          f3
66       - kind:            group-child
67         target:          g1
68       - kind:            group-child
69         target:          d1
70 ---
71 undefined-atoms:
72     - name:              f3
73       can-be-null:       never
74 ...
75
76 #CHECK:   - name:            anotherfunction
77 #CHECK:     scope:           global
78 #CHECK:     type:            data
79 #CHECK: undefined-atoms:
80 #CHECK:   - name:            f3