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

21 lines
934 B
Plaintext

# The test checks for mergeable strings that appear in the object file
RUN: lld -flavor 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: 2^3
mergeAtoms: references:
mergeAtoms: - kind: R_X86_64_64
mergeAtoms: offset: 3
mergeAtoms: target: [[CONSTANT]]