[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / llvm-objcopy / ELF / localize-hidden.test
blobfe8639f74efdfbfe2b634d564fde9465f7eadd9a
1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-objcopy --localize-hidden %t %t2
3 # RUN: llvm-readobj --relocations --symbols %t2 | FileCheck %s
5 !ELF
6 FileHeader:
7   Class:           ELFCLASS64
8   Data:            ELFDATA2LSB
9   Type:            ET_REL
10   Machine:         EM_X86_64
11 Sections:
12   - Name:            .text
13     Type:            SHT_PROGBITS
14     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
15     Address:         0x1000
16     AddressAlign:    0x0000000000000010
17     Size:            64
18   - Name:            .data
19     Type:            SHT_PROGBITS
20     Flags:           [ SHF_ALLOC ]
21     Address:         0x2000
22     AddressAlign:    0x0000000000000010
23     Content:         "0000000000000000"
24   - Name:            .rel.text
25     Type:            SHT_REL
26     Info:            .text
27     Relocations:
28       - Offset: 0x1000
29         Symbol: undefGlobal
30         Type:   R_X86_64_PC32
31 Symbols:
32   - Name:     hiddenLocal
33     Type:     STT_FUNC
34     Section:  .text
35     Value:    0x1008
36     Size:     8
37     Other:    [ STV_HIDDEN ]
38   - Name:     defaultGlobal
39     Type:     STT_FUNC
40     Size:     8
41     Section:  .text
42     Value:    0x1000
43     Binding:  STB_GLOBAL
44   - Name:     hiddenGlobal
45     Type:     STT_OBJECT
46     Section:  .data
47     Value:    0x2006
48     Size:     2
49     Other:    [ STV_HIDDEN ]
50     Binding:  STB_GLOBAL
51   - Name:     hiddenGlobalCommon
52     Type:     STT_OBJECT
53     Index:    SHN_COMMON
54     Value:    0x2006
55     Size:     2
56     Other:    [ STV_HIDDEN ]
57     Binding:  STB_GLOBAL
58   - Name:     undefGlobal
59     Type:     STT_FUNC
60     Size:     8
61     Binding:  STB_GLOBAL
62   - Name:     internalGlobal
63     Type:     STT_OBJECT
64     Section:  .data
65     Value:    0x2002
66     Size:     2
67     Other:    [ STV_INTERNAL ]
68     Binding:  STB_GLOBAL
69   - Name:     protectedGlobal
70     Type:     STT_OBJECT
71     Section:  .data
72     Value:    0x2000
73     Size:     4
74     Other:    [ STV_PROTECTED ]
75     Binding:  STB_GLOBAL
76   - Name:     hiddenWeak
77     Type:     STT_FUNC
78     Section:  .text
79     Value:    0x1010
80     Size:     8
81     Other:    [ STV_HIDDEN ]
82     Binding:  STB_WEAK
84 #CHECK:     Relocations [
85 #CHECK-NEXT:  Section (3) .rel.text {
86 #CHECK-NEXT:    0x1000 R_X86_64_PC32 undefGlobal 0x0
87 #CHECK-NEXT:  }
88 #CHECK-NEXT:]
91 #CHECK: Symbols [
92 #CHECK-NEXT:  Symbol {
93 #CHECK-NEXT:    Name:
94 #CHECK-NEXT:    Value: 0x0
95 #CHECK-NEXT:    Size: 0
96 #CHECK-NEXT:    Binding: Local
97 #CHECK-NEXT:    Type: None
98 #CHECK-NEXT:    Other: 0
99 #CHECK-NEXT:    Section: Undefined
100 #CHECK-NEXT:  }
101 #CHECK-NEXT:  Symbol {
102 #CHECK-NEXT:    Name: hiddenLocal
103 #CHECK-NEXT:    Value: 0x1008
104 #CHECK-NEXT:    Size: 8
105 #CHECK-NEXT:    Binding: Local
106 #CHECK-NEXT:    Type: Function
107 #CHECK-NEXT:    Other [
108 #CHECK-NEXT:      STV_HIDDEN
109 #CHECK-NEXT:    ]
110 #CHECK-NEXT:    Section: .text
111 #CHECK-NEXT:  }
112 #CHECK-NEXT:  Symbol {
113 #CHECK-NEXT:    Name: hiddenGlobal
114 #CHECK-NEXT:    Value: 0x2006
115 #CHECK-NEXT:    Size: 2
116 #CHECK-NEXT:    Binding: Local
117 #CHECK-NEXT:    Type: Object
118 #CHECK-NEXT:    Other [
119 #CHECK-NEXT:      STV_HIDDEN
120 #CHECK-NEXT:    ]
121 #CHECK-NEXT:    Section: .data
122 #CHECK-NEXT:  }
123 #CHECK-NEXT:  Symbol {
124 #CHECK-NEXT:    Name: internalGlobal
125 #CHECK-NEXT:    Value: 0x2002
126 #CHECK-NEXT:    Size: 2
127 #CHECK-NEXT:    Binding: Local
128 #CHECK-NEXT:    Type: Object
129 #CHECK-NEXT:    Other [
130 #CHECK-NEXT:      STV_INTERNAL
131 #CHECK-NEXT:    ]
132 #CHECK-NEXT:    Section: .data
133 #CHECK-NEXT:  }
134 #CHECK-NEXT:  Symbol {
135 #CHECK-NEXT:    Name: hiddenWeak
136 #CHECK-NEXT:    Value: 0x1010
137 #CHECK-NEXT:    Size: 8
138 #CHECK-NEXT:    Binding: Local
139 #CHECK-NEXT:    Type: Function
140 #CHECK-NEXT:    Other [
141 #CHECK-NEXT:      STV_HIDDEN
142 #CHECK-NEXT:    ]
143 #CHECK-NEXT:    Section: .text
144 #CHECK-NEXT:  }
145 #CHECK-NEXT:  Symbol {
146 #CHECK-NEXT:    Name: defaultGlobal
147 #CHECK-NEXT:    Value: 0x1000
148 #CHECK-NEXT:    Size: 8
149 #CHECK-NEXT:    Binding: Global
150 #CHECK-NEXT:    Type: Function
151 #CHECK-NEXT:    Other: 0
152 #CHECK-NEXT:    Section: .text
153 #CHECK-NEXT:  }
154 #CHECK-NEXT:  Symbol {
155 #CHECK-NEXT:    Name: hiddenGlobalCommon
156 #CHECK-NEXT:    Value: 0x2006
157 #CHECK-NEXT:    Size: 2
158 #CHECK-NEXT:    Binding: Global
159 #CHECK-NEXT:    Type: Object
160 #CHECK-NEXT:    Other [
161 #CHECK-NEXT:      STV_HIDDEN
162 #CHECK-NEXT:    ]
163 #CHECK-NEXT:    Section: Common (0xF
164 #CHECK-NEXT:  }
165 #CHECK-NEXT:  Symbol {
166 #CHECK-NEXT:    Name: undefGlobal
167 #CHECK-NEXT:    Value: 0x0
168 #CHECK-NEXT:    Size: 8
169 #CHECK-NEXT:    Binding: Global
170 #CHECK-NEXT:    Type: Function
171 #CHECK-NEXT:    Other: 0
172 #CHECK-NEXT:    Section:
173 #CHECK-NEXT:  }
174 #CHECK-NEXT:  Symbol {
175 #CHECK-NEXT:    Name: protectedGlobal
176 #CHECK-NEXT:    Value: 0x2000
177 #CHECK-NEXT:    Size: 4
178 #CHECK-NEXT:    Binding: Global
179 #CHECK-NEXT:    Type: Object
180 #CHECK-NEXT:    Other [
181 #CHECK-NEXT:      STV_PROTECTED
182 #CHECK-NEXT:    ]
183 #CHECK-NEXT:    Section: .data
184 #CHECK-NEXT:  }
185 #CHECK-NEXT:]