blob: fcf04845a7ddd1653551e785c4f44f0adacd4e35 [file] [log] [blame]
# RUN: lld -core %s %p/Inputs/custom-section-coalesce.objtxt \
# RUN: %p/Inputs/custom-section-coalesce2.objtxt | 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 ]
...
# 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