llvm-project/lld/test/old-elf/mergeconstants.test

21 lines
936 B
Plaintext

# The test checks for mergeable strings that appear in the object file
RUN: lld -flavor old-gnu --merge-strings --output-filetype=yaml -target x86_64 \
RUN: %p/Inputs/constants-merge.x86-64 --noinhibit-exec \
RUN: | FileCheck -check-prefix=mergeAtoms %s
mergeAtoms: - ref-name: [[CONSTANT:[-a-zA-Z0-9_]+]]
mergeAtoms: type: constant
mergeAtoms: content: [ 62, 61, 72, 66, 6F, 6F, 00 ]
mergeAtoms: merge: by-content
mergeAtoms: section-choice: custom-required
mergeAtoms: section-name: .rodata.str1.1
mergeAtoms: - name: foo
mergeAtoms: scope: global
mergeAtoms: type: data
mergeAtoms: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
mergeAtoms: alignment: 8
mergeAtoms: references:
mergeAtoms: - kind: R_X86_64_64
mergeAtoms: offset: 3
mergeAtoms: target: [[CONSTANT]]