blob: f191113718dfd7fbf8859e805ef51c9d3cf76d10 [file] [log] [blame]
Rafael Espindolac08ab8e2015-04-24 15:51:45 +00001# RUN: lld -core %s %p/Inputs/sectiongroup-rearrange-resolve.objtxt | FileCheck %s
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +00002
3#
4# Test that section groups are parsed and the first group selected for symbol
5# resolution
6#
7
8---
9defined-atoms:
10 - name: g1
11 scope: global
12 type: group-comdat
13 references:
14 - kind: group-child
15 target: f1
16 - kind: group-child
17 target: f2
18 - kind: group-child
19 target: g1
20 - kind: group-child
21 target: d1
22 - name: f1
23 scope: global
24 type: code
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +000025 - name: f2
26 scope: global
27 type: code
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +000028 - name: g1
29 scope: global
30 type: code
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +000031 - name: d1
32 scope: global
33 type: data
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +000034...
35
36# CHECK: defined-atoms:
37# CHECK: - name: g1
38# CHECK: ref-name: [[PARENT:[a-zA-Z\.0-9_]+]]
39# CHECK: type: group-comdat
40# CHECK: references:
41# CHECK: - kind: group-child
42# CHECK: target: f1
43# CHECK: - kind: group-child
44# CHECK: target: f2
45# CHECK: - kind: group-child
46# CHECK: target: [[CHILD:[a-zA-Z\.0-9_]+]]
47# CHECK: - kind: group-child
48# CHECK: target: d1
49# CHECK: - name: f1
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +000050# CHECK: - name: f2
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +000051# CHECK: - name: g1
52# CHECK: ref-name: [[CHILD]]
Shankar Easwaran7ac2a3d2014-03-26 16:37:13 +000053# CHECK: - name: d1