1 ## Check how obj2yaml dumps the SHT_LLVM_ADDRSIG section.
3 ## Check that when possible obj2yaml tries to produce the "Name" tag when
4 ## dumping entries of the SHT_LLVM_ADDRSIG section. It falls back to producing
5 ## the "Index" tag when it can't match a symbol index with a symbol table entry.
7 # RUN: yaml2obj --docnum=1 %s -o %t1
8 # RUN: obj2yaml %t1 | FileCheck %s --check-prefix=NAME
10 # NAME: - Name: .llvm_addrsig
11 # NAME-NEXT: Type: SHT_LLVM_ADDRSIG
12 # NAME-NEXT: Link: .symtab
14 # NAME-NEXT: - Name: foo
15 # NAME-NEXT: - Name: bar
16 # NAME-NEXT: - Index: 0x00000003
17 # NAME-NEXT: - Index: 0xFFFFFFFF
18 # NAME: - Name: .llvm_addrsig_unlinked
19 # NAME-NEXT: Type: SHT_LLVM_ADDRSIG
21 # NAME-NEXT: - Index: 0x00000001
22 # NAME-NEXT: - Index: 0x00000002
23 # NAME-NEXT: - Index: 0x00000003
24 # NAME-NEXT: - Index: 0xFFFFFFFF
34 Type: SHT_LLVM_ADDRSIG
40 - Name: .llvm_addrsig_unlinked
41 Type: SHT_LLVM_ADDRSIG
56 ## Check that obj2yaml dumps the SHT_LLVM_ADDRSIG section
57 ## data using the "Content" tag when at least one of the entries is broken,
58 ## e.g. because the entry contains a malformed uleb128 value.
60 # RUN: yaml2obj --docnum=2 %s -o %t2
61 # RUN: obj2yaml %t2 | FileCheck %s --check-prefix=INVALID-ENTRY
63 # INVALID-ENTRY: - Name: .llvm_addrsig
64 # INVALID-ENTRY-NEXT: Type: SHT_LLVM_ADDRSIG
65 # INVALID-ENTRY-NEXT: Content: FFFFFFFFFF
75 Type: SHT_LLVM_ADDRSIG
78 ## obj2yaml produces a "Symbols" tag when describing an empty SHT_LLVM_ADDRSIG section.
80 # RUN: yaml2obj --docnum=3 %s -o %t3
81 # RUN: obj2yaml %t3 | FileCheck %s --check-prefix=EMPTY
83 # EMPTY: - Name: .llvm_addrsig
84 # EMPTY-NEXT: Type: SHT_LLVM_ADDRSIG
85 # EMPTY-NEXT: Symbols: []
95 Type: SHT_LLVM_ADDRSIG