1 ## Check that yaml2obj is able to produce an object from YAML
2 ## containing symbols with duplicate names (but different name suffixes).
4 # RUN: yaml2obj --docnum=1 %s -o %t1
5 # RUN: llvm-readobj --syms %t1 | FileCheck %s --check-prefix=CASE1
7 # CASE1: Name: localfoo (1)
8 # CASE1: Name: localfoo (1)
17 - Name: 'localfoo (1)'
19 ## Check that yaml2obj reports an error when we have
20 ## symbols with equal names and suffixes.
22 # RUN: not yaml2obj --docnum=2 %s 2>&1| FileCheck %s --check-prefix=CASE2
23 # CASE2-COUNT-2: error: repeated symbol name: 'localfoo (1)'
31 - Name: 'localfoo (1)'
32 - Name: 'localfoo (1)'
33 - Name: 'localfoo (1)'
35 ## Check that yaml2obj reports an error when we have
36 ## symbols without suffixes in the names and their
39 # RUN: not yaml2obj --docnum=3 %s 2>&1| FileCheck %s --check-prefix=CASE3
40 # CASE3: error: repeated symbol name: 'localfoo'
41 # CASE3: error: repeated symbol name: 'localfoo'
53 ## Check that yaml2obj can produce correct relocations that
54 ## reference symbols with name suffixes.
56 # RUN: yaml2obj --docnum=4 %s -o %t4
57 # RUN: llvm-readobj -r --expand-relocs %t4 | FileCheck %s --check-prefix=CASE4
59 # CASE4: Relocations [
60 # CASE4-NEXT: Section {{.*}} .rela.text {
61 # CASE4-NEXT: Relocation {
62 # CASE4-NEXT: Offset: 0x0
63 # CASE4-NEXT: Type: R_X86_64_NONE
64 # CASE4-NEXT: Symbol: foo (1)
65 # CASE4-NEXT: Addend: 0x0
67 # CASE4-NEXT: Relocation {
68 # CASE4-NEXT: Offset: 0x1
69 # CASE4-NEXT: Type: R_X86_64_NONE
70 # CASE4-NEXT: Symbol: foo (2)
71 # CASE4-NEXT: Addend: 0x0