blob: e9bada56938d91ba46c90ea6e05f2d918b1b1e63 [file] [log] [blame]
# RUN: lld -core %s | FileCheck %s
#
# Test that custom sections are preserved when duplicate merge-by-content
# constants are coalesced.
#
---
defined-atoms:
- ref-name: L1
type: constant
merge: by-content
content: [ 01, 02, 03, 04 ]
section-choice: custom-required
section-name: .mysection
- ref-name: L2
type: constant
merge: by-content
content: [ 05, 06, 07, 08 ]
section-choice: custom-required
section-name: .mysection
- ref-name: L3
type: constant
merge: by-content
content: [ 01, 02, 03, 04 ]
---
defined-atoms:
- ref-name: L1
type: constant
merge: by-content
content: [ 01, 02, 03, 04 ]
section-choice: custom-required
section-name: .mysection
- ref-name: L2
type: constant
merge: by-content
content: [ 01, 02, 03, 04 ]
section-choice: custom-required
section-name: .mysection2
---
defined-atoms:
- ref-name: L1
type: constant
merge: by-content
content: [ 05, 06, 07, 08 ]
section-choice: custom-required
section-name: .mysection
- ref-name: L2
type: constant
merge: by-content
content: [ 01, 02, 03, 04 ]
...
# CHECK:defined-atoms:
# CHECK: - type: constant
# CHECK: content: [ 01, 02, 03, 04 ]
# CHECK: merge: by-content
# CHECK: section-choice: custom-required
# CHECK: section-name: .mysection
# CHECK: - type: constant
# CHECK: content: [ 05, 06, 07, 08 ]
# CHECK: merge: by-content
# CHECK: section-choice: custom-required
# CHECK: section-name: .mysection
# CHECK: - type: constant
# CHECK: content: [ 01, 02, 03, 04 ]
# CHECK: merge: by-content
# CHECK: - type: constant
# CHECK: content: [ 01, 02, 03, 04 ]
# CHECK: merge: by-content
# CHECK: section-choice: custom-required
# CHECK: section-name: .mysection2