llvm-project/lld/test/core/sectiongroup-rearrange-reso...

80 lines
2.2 KiB
Plaintext
Raw Normal View History

# RUN: lld -core %s | FileCheck %s
#
# Test that section groups are parsed and the first group selected for symbol
# resolution
#
---
defined-atoms:
- name: g1
scope: global
type: group-comdat
references:
- kind: group-child
target: f1
- kind: group-child
target: f2
- kind: group-child
target: g1
- kind: group-child
target: d1
- name: f1
scope: global
type: code
- name: f2
scope: global
type: code
- name: g1
scope: global
type: code
- name: d1
scope: global
type: data
---
defined-atoms:
- name: g1
scope: global
type: group-comdat
references:
- kind: group-child
target: f1
- kind: group-child
target: f2
- kind: group-child
target: g1
- kind: group-child
target: d1
- name: f1
scope: global
type: code
- name: f2
scope: global
type: code
- name: g1
scope: global
type: code
- name: d1
scope: global
type: data
...
# CHECK: defined-atoms:
# CHECK: - name: g1
# CHECK: ref-name: [[PARENT:[a-zA-Z\.0-9_]+]]
# CHECK: type: group-comdat
# CHECK: references:
# CHECK: - kind: group-child
# CHECK: target: f1
# CHECK: - kind: group-child
# CHECK: target: f2
# CHECK: - kind: group-child
# CHECK: target: [[CHILD:[a-zA-Z\.0-9_]+]]
# CHECK: - kind: group-child
# CHECK: target: d1
# CHECK: - name: f1
# CHECK: - name: f2
# CHECK: - name: g1
# CHECK: ref-name: [[CHILD]]
# CHECK: - name: d1