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

24 lines
1.1 KiB
Plaintext

# The test checks for mergeable strings that appear in the object file
RUN: lld -flavor gnu --merge-strings -emit-yaml %p/Inputs/constants-merge.x86-64 | 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: section-choice: custom-required
mergeAtoms: section-name: .data
mergeAtoms: references:
mergeAtoms: - kind: R_X86_64_64
mergeAtoms: offset: 3
mergeAtoms: target: [[CONSTANT]]
mergeAtoms: - kind: layout-before
mergeAtoms: offset: 0
mergeAtoms: target: bar