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 -t %t1 | FileCheck %s --check-prefix=CASE1
7 # CASE1: Name: localfoo (1)
8 # CASE1: Name: localfoo (1)
18 - Name: 'localfoo [1]'
20 ## Check that yaml2obj reports an error when we have
21 ## symbols with equal names and suffixes.
23 # RUN: not yaml2obj --docnum=2 %s 2>&1| FileCheck %s --check-prefix=CASE2
24 # CASE2: error: Repeated symbol name: 'localfoo [1]'.
33 - Name: 'localfoo [1]'
34 - Name: 'localfoo [1]'
36 ## Check that yaml2obj reports an error when we have
37 ## symbols without suffixes in the names and their
40 # RUN: not yaml2obj --docnum=3 %s 2>&1| FileCheck %s --check-prefix=CASE3
41 # CASE3: error: Repeated symbol name: 'localfoo'.
55 ## Check that yaml2obj can produce correct relocations that
56 ## reference symbols with name suffixes.
58 # RUN: yaml2obj --docnum=4 %s -o %t4
59 # RUN: llvm-readobj -r --expand-relocs %t4 | FileCheck %s --check-prefix=CASE4
61 # CASE4: Relocations [
62 # CASE4-NEXT: Section {{.*}} .rela.text {
63 # CASE4-NEXT: Relocation {
64 # CASE4-NEXT: Offset: 0x0
65 # CASE4-NEXT: Type: R_X86_64_NONE
66 # CASE4-NEXT: Symbol: foo (1)
67 # CASE4-NEXT: Addend: 0x0
69 # CASE4-NEXT: Relocation {
70 # CASE4-NEXT: Offset: 0x1
71 # CASE4-NEXT: Type: R_X86_64_NONE
72 # CASE4-NEXT: Symbol: foo (2)
73 # CASE4-NEXT: Addend: 0x0