1// RUN: llvm-mc -filetype=asm -triple x86_64-pc-linux-gnu %s -o - | FileCheck --check-prefix=ASM %s
2// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols --sd --addrsig - | FileCheck %s
3// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -split-dwarf-file %t.dwo -o - | llvm-readobj -S --symbols --sd --addrsig - | FileCheck %s
4// RUN: llvm-readobj -S %t.dwo | FileCheck --check-prefix=DWO %s
5
6// CHECK:        Name: .llvm_addrsig
7// CHECK-NEXT:   Type: SHT_LLVM_ADDRSIG (0x6FFF4C03)
8// CHECK-NEXT:   Flags [ (0x80000000)
9// CHECK-NEXT:     SHF_EXCLUDE (0x80000000)
10// CHECK-NEXT:   ]
11// CHECK-NEXT:   Address:
12// CHECK-NEXT:   Offset:
13// CHECK-NEXT:   Size: 4
14// CHECK-NEXT:   Link: 4
15// CHECK-NEXT:   Info: 0
16// CHECK-NEXT:   AddressAlignment: 1
17// CHECK-NEXT:   EntrySize: 0
18// CHECK-NEXT:   SectionData (
19// CHECK-NEXT:     0000: 03050102
20// CHECK-NEXT:   )
21// CHECK-NEXT: }
22// CHECK-NEXT: Section {
23// CHECK-NEXT:   Index: 4
24// CHECK-NEXT:   Name: .symtab
25
26// CHECK:        Name: local
27// CHECK-NEXT:   Value:
28// CHECK-NEXT:   Size:
29// CHECK-NEXT:   Binding:
30// CHECK-NEXT:   Type:
31// CHECK-NEXT:   Other:
32// CHECK-NEXT:   Section: [[SEC:.*]]
33// CHECK-NEXT: }
34// CHECK-NEXT: Symbol {
35// CHECK-NEXT:   Name:
36// CHECK-NEXT:   Value:
37// CHECK-NEXT:   Size:
38// CHECK-NEXT:   Binding:
39// CHECK-NEXT:   Type:
40// CHECK-NEXT:   Other:
41// CHECK-NEXT:   Section: [[SEC]]
42// CHECK-NEXT: }
43// CHECK-NEXT: Symbol {
44// CHECK-NEXT:   Name: g1
45// CHECK-NEXT:   Value:
46// CHECK-NEXT:   Size:
47// CHECK-NEXT:   Binding:
48// CHECK-NEXT:   Type:
49// CHECK-NEXT:   Other:
50// CHECK-NEXT:   Section:
51// CHECK-NEXT: }
52// CHECK-NEXT: Symbol {
53// CHECK-NEXT:   Name: g2
54// CHECK-NEXT:   Value:
55// CHECK-NEXT:   Size:
56// CHECK-NEXT:   Binding:
57// CHECK-NEXT:   Type:
58// CHECK-NEXT:   Other:
59// CHECK-NEXT:   Section:
60// CHECK-NEXT: }
61// CHECK-NEXT: Symbol {
62// CHECK-NEXT:   Name: g3
63
64// CHECK:      Addrsig [
65// CHECK-NEXT:   Sym: g1 (3)
66// CHECK-NEXT:   Sym: g3 (5)
67// CHECK-NEXT:   Sym: local (1)
68// CHECK-NEXT:   Sym:  (2)
69// CHECK-NEXT: ]
70
71// ASM: .addrsig
72.addrsig
73// ASM: .addrsig_sym g1
74.addrsig_sym g1
75.globl g2
76// ASM: .addrsig_sym g3
77.addrsig_sym g3
78// ASM: .addrsig_sym local
79.addrsig_sym local
80// ASM: .addrsig_sym .Llocal
81.addrsig_sym .Llocal
82
83local:
84.Llocal:
85
86// DWO-NOT: .llvm_addrsig
87