1 RUN: llvm-readobj -mips-plt-got %p/Inputs/relocs.obj.elf-mips | \ 2 RUN: FileCheck %s -check-prefix GOT-OBJ 3 RUN: llvm-readobj -mips-plt-got %p/Inputs/dynamic-table-exe.mips | \ 4 RUN: FileCheck %s -check-prefix GOT-EXE 5 RUN: llvm-readobj -mips-plt-got %p/Inputs/dynamic-table-so.mips | \ 6 RUN: FileCheck %s -check-prefix GOT-SO 7 RUN: llvm-readobj -mips-plt-got %p/Inputs/got-tls.so.elf-mips64el | \ 8 RUN: FileCheck %s -check-prefix GOT-TLS 9 RUN: llvm-readobj -mips-plt-got %p/Inputs/got-empty.exe.mipsel | \ 10 RUN: FileCheck %s -check-prefix GOT-EMPTY 11 12 GOT-OBJ: Cannot find PLTGOT dynamic table tag. 13 14 GOT-EXE: Primary GOT { 15 GOT-EXE-NEXT: Canonical gp value: 0x418880 16 GOT-EXE-NEXT: Reserved entries [ 17 GOT-EXE-NEXT: Entry { 18 GOT-EXE-NEXT: Address: 0x410890 19 GOT-EXE-NEXT: Access: -32752 20 GOT-EXE-NEXT: Initial: 0x0 21 GOT-EXE-NEXT: Purpose: Lazy resolver 22 GOT-EXE-NEXT: } 23 GOT-EXE-NEXT: Entry { 24 GOT-EXE-NEXT: Address: 0x410894 25 GOT-EXE-NEXT: Access: -32748 26 GOT-EXE-NEXT: Initial: 0x80000000 27 GOT-EXE-NEXT: Purpose: Module pointer (GNU extension) 28 GOT-EXE-NEXT: } 29 GOT-EXE-NEXT: ] 30 GOT-EXE-NEXT: Local entries [ 31 GOT-EXE-NEXT: Entry { 32 GOT-EXE-NEXT: Address: 0x410898 33 GOT-EXE-NEXT: Access: -32744 34 GOT-EXE-NEXT: Initial: 0x400418 35 GOT-EXE-NEXT: } 36 GOT-EXE-NEXT: Entry { 37 GOT-EXE-NEXT: Address: 0x41089C 38 GOT-EXE-NEXT: Access: -32740 39 GOT-EXE-NEXT: Initial: 0x410840 40 GOT-EXE-NEXT: } 41 GOT-EXE-NEXT: Entry { 42 GOT-EXE-NEXT: Address: 0x4108A0 43 GOT-EXE-NEXT: Access: -32736 44 GOT-EXE-NEXT: Initial: 0x0 45 GOT-EXE-NEXT: } 46 GOT-EXE-NEXT: ] 47 GOT-EXE-NEXT: Global entries [ 48 GOT-EXE-NEXT: Entry { 49 GOT-EXE-NEXT: Address: 0x4108A4 50 GOT-EXE-NEXT: Access: -32732 51 GOT-EXE-NEXT: Initial: 0x0 52 GOT-EXE-NEXT: Value: 0x0 53 GOT-EXE-NEXT: Type: Function (0x2) 54 GOT-EXE-NEXT: Section: Undefined (0x0) 55 GOT-EXE-NEXT: Name: __gmon_start__@ (1) 56 GOT-EXE-NEXT: } 57 GOT-EXE-NEXT: ] 58 GOT-EXE-NEXT: Number of TLS and multi-GOT entries: 0 59 GOT-EXE-NEXT: } 60 61 GOT-SO: Primary GOT { 62 GOT-SO-NEXT: Canonical gp value: 0x188D0 63 GOT-SO-NEXT: Reserved entries [ 64 GOT-SO-NEXT: Entry { 65 GOT-SO-NEXT: Address: 0x108E0 66 GOT-SO-NEXT: Access: -32752 67 GOT-SO-NEXT: Initial: 0x0 68 GOT-SO-NEXT: Purpose: Lazy resolver 69 GOT-SO-NEXT: } 70 GOT-SO-NEXT: Entry { 71 GOT-SO-NEXT: Address: 0x108E4 72 GOT-SO-NEXT: Access: -32748 73 GOT-SO-NEXT: Initial: 0x80000000 74 GOT-SO-NEXT: Purpose: Module pointer (GNU extension) 75 GOT-SO-NEXT: } 76 GOT-SO-NEXT: ] 77 GOT-SO-NEXT: Local entries [ 78 GOT-SO-NEXT: Entry { 79 GOT-SO-NEXT: Address: 0x108E8 80 GOT-SO-NEXT: Access: -32744 81 GOT-SO-NEXT: Initial: 0x108E0 82 GOT-SO-NEXT: } 83 GOT-SO-NEXT: Entry { 84 GOT-SO-NEXT: Address: 0x108EC 85 GOT-SO-NEXT: Access: -32740 86 GOT-SO-NEXT: Initial: 0x10000 87 GOT-SO-NEXT: } 88 GOT-SO-NEXT: Entry { 89 GOT-SO-NEXT: Address: 0x108F0 90 GOT-SO-NEXT: Access: -32736 91 GOT-SO-NEXT: Initial: 0x10920 92 GOT-SO-NEXT: } 93 GOT-SO-NEXT: Entry { 94 GOT-SO-NEXT: Address: 0x108F4 95 GOT-SO-NEXT: Access: -32732 96 GOT-SO-NEXT: Initial: 0x108CC 97 GOT-SO-NEXT: } 98 GOT-SO-NEXT: Entry { 99 GOT-SO-NEXT: Address: 0x108F8 100 GOT-SO-NEXT: Access: -32728 101 GOT-SO-NEXT: Initial: 0x0 102 GOT-SO-NEXT: } 103 GOT-SO-NEXT: Entry { 104 GOT-SO-NEXT: Address: 0x108FC 105 GOT-SO-NEXT: Access: -32724 106 GOT-SO-NEXT: Initial: 0x0 107 GOT-SO-NEXT: } 108 GOT-SO-NEXT: Entry { 109 GOT-SO-NEXT: Address: 0x10900 110 GOT-SO-NEXT: Access: -32720 111 GOT-SO-NEXT: Initial: 0x0 112 GOT-SO-NEXT: } 113 GOT-SO-NEXT: Entry { 114 GOT-SO-NEXT: Address: 0x10904 115 GOT-SO-NEXT: Access: -32716 116 GOT-SO-NEXT: Initial: 0x0 117 GOT-SO-NEXT: } 118 GOT-SO-NEXT: ] 119 GOT-SO-NEXT: Global entries [ 120 GOT-SO-NEXT: Entry { 121 GOT-SO-NEXT: Address: 0x10908 122 GOT-SO-NEXT: Access: -32712 123 GOT-SO-NEXT: Initial: 0x0 124 GOT-SO-NEXT: Value: 0x0 125 GOT-SO-NEXT: Type: None (0x0) 126 GOT-SO-NEXT: Section: Undefined (0x0) 127 GOT-SO-NEXT: Name: _ITM_registerTMCloneTable@ (87) 128 GOT-SO-NEXT: } 129 GOT-SO-NEXT: Entry { 130 GOT-SO-NEXT: Address: 0x1090C 131 GOT-SO-NEXT: Access: -32708 132 GOT-SO-NEXT: Initial: 0x0 133 GOT-SO-NEXT: Value: 0x0 134 GOT-SO-NEXT: Type: None (0x0) 135 GOT-SO-NEXT: Section: Undefined (0x0) 136 GOT-SO-NEXT: Name: _Jv_RegisterClasses@ (128) 137 GOT-SO-NEXT: } 138 GOT-SO-NEXT: Entry { 139 GOT-SO-NEXT: Address: 0x10910 140 GOT-SO-NEXT: Access: -32704 141 GOT-SO-NEXT: Initial: 0x0 142 GOT-SO-NEXT: Value: 0x0 143 GOT-SO-NEXT: Type: Function (0x2) 144 GOT-SO-NEXT: Section: Undefined (0x0) 145 GOT-SO-NEXT: Name: __gmon_start__@ (23) 146 GOT-SO-NEXT: } 147 GOT-SO-NEXT: Entry { 148 GOT-SO-NEXT: Address: 0x10914 149 GOT-SO-NEXT: Access: -32700 150 GOT-SO-NEXT: Initial: 0x840 151 GOT-SO-NEXT: Value: 0x840 152 GOT-SO-NEXT: Type: Function (0x2) 153 GOT-SO-NEXT: Section: Undefined (0x0) 154 GOT-SO-NEXT: Name: puts (a] GLIBC_2.0 (162) 155 GOT-SO-NEXT: } 156 GOT-SO-NEXT: Entry { 157 GOT-SO-NEXT: Address: 0x10918 158 GOT-SO-NEXT: Access: -32696 159 GOT-SO-NEXT: Initial: 0x0 160 GOT-SO-NEXT: Value: 0x0 161 GOT-SO-NEXT: Type: None (0x0) 162 GOT-SO-NEXT: Section: Undefined (0x0) 163 GOT-SO-NEXT: Name: _ITM_deregisterTMCloneTable@ (59) 164 GOT-SO-NEXT: } 165 GOT-SO-NEXT: Entry { 166 GOT-SO-NEXT: Address: 0x1091C 167 GOT-SO-NEXT: Access: -32692 168 GOT-SO-NEXT: Initial: 0x0 169 GOT-SO-NEXT: Value: 0x0 170 GOT-SO-NEXT: Type: Function (0x2) 171 GOT-SO-NEXT: Section: Undefined (0x0) 172 GOT-SO-NEXT: Name: __cxa_finalize (a] GLIBC_2.2 (113) 173 GOT-SO-NEXT: } 174 GOT-SO-NEXT: ] 175 GOT-SO-NEXT: Number of TLS and multi-GOT entries: 0 176 GOT-SO-NEXT: } 177 178 GOT-TLS: Primary GOT { 179 GOT-TLS-NEXT: Canonical gp value: 0x18BF0 180 GOT-TLS-NEXT: Reserved entries [ 181 GOT-TLS-NEXT: Entry { 182 GOT-TLS-NEXT: Address: 0x10C00 183 GOT-TLS-NEXT: Access: -32752 184 GOT-TLS-NEXT: Initial: 0x0 185 GOT-TLS-NEXT: Purpose: Lazy resolver 186 GOT-TLS-NEXT: } 187 GOT-TLS-NEXT: Entry { 188 GOT-TLS-NEXT: Address: 0x10C08 189 GOT-TLS-NEXT: Access: -32744 190 GOT-TLS-NEXT: Initial: 0x8000000000000000 191 GOT-TLS-NEXT: Purpose: Module pointer (GNU extension) 192 GOT-TLS-NEXT: } 193 GOT-TLS-NEXT: ] 194 GOT-TLS-NEXT: Local entries [ 195 GOT-TLS-NEXT: Entry { 196 GOT-TLS-NEXT: Address: 0x10C10 197 GOT-TLS-NEXT: Access: -32736 198 GOT-TLS-NEXT: Initial: 0x10000 199 GOT-TLS-NEXT: } 200 GOT-TLS-NEXT: Entry { 201 GOT-TLS-NEXT: Address: 0x10C18 202 GOT-TLS-NEXT: Access: -32728 203 GOT-TLS-NEXT: Initial: 0x10C00 204 GOT-TLS-NEXT: } 205 GOT-TLS-NEXT: Entry { 206 GOT-TLS-NEXT: Address: 0x10C20 207 GOT-TLS-NEXT: Access: -32720 208 GOT-TLS-NEXT: Initial: 0x10CB8 209 GOT-TLS-NEXT: } 210 GOT-TLS-NEXT: Entry { 211 GOT-TLS-NEXT: Address: 0x10C28 212 GOT-TLS-NEXT: Access: -32712 213 GOT-TLS-NEXT: Initial: 0x10BF0 214 GOT-TLS-NEXT: } 215 GOT-TLS-NEXT: Entry { 216 GOT-TLS-NEXT: Address: 0x10C30 217 GOT-TLS-NEXT: Access: -32704 218 GOT-TLS-NEXT: Initial: 0x0 219 GOT-TLS-NEXT: } 220 GOT-TLS-NEXT: Entry { 221 GOT-TLS-NEXT: Address: 0x10C38 222 GOT-TLS-NEXT: Access: -32696 223 GOT-TLS-NEXT: Initial: 0x948 224 GOT-TLS-NEXT: } 225 GOT-TLS-NEXT: Entry { 226 GOT-TLS-NEXT: Address: 0x10C40 227 GOT-TLS-NEXT: Access: -32688 228 GOT-TLS-NEXT: Initial: 0xA20 229 GOT-TLS-NEXT: } 230 GOT-TLS-NEXT: Entry { 231 GOT-TLS-NEXT: Address: 0x10C48 232 GOT-TLS-NEXT: Access: -32680 233 GOT-TLS-NEXT: Initial: 0xAF0 234 GOT-TLS-NEXT: } 235 GOT-TLS-NEXT: Entry { 236 GOT-TLS-NEXT: Address: 0x10C50 237 GOT-TLS-NEXT: Access: -32672 238 GOT-TLS-NEXT: Initial: 0x0 239 GOT-TLS-NEXT: } 240 GOT-TLS-NEXT: Entry { 241 GOT-TLS-NEXT: Address: 0x10C58 242 GOT-TLS-NEXT: Access: -32664 243 GOT-TLS-NEXT: Initial: 0x0 244 GOT-TLS-NEXT: } 245 GOT-TLS-NEXT: Entry { 246 GOT-TLS-NEXT: Address: 0x10C60 247 GOT-TLS-NEXT: Access: -32656 248 GOT-TLS-NEXT: Initial: 0x0 249 GOT-TLS-NEXT: } 250 GOT-TLS-NEXT: ] 251 GOT-TLS-NEXT: Global entries [ 252 GOT-TLS-NEXT: Entry { 253 GOT-TLS-NEXT: Address: 0x10C68 254 GOT-TLS-NEXT: Access: -32648 255 GOT-TLS-NEXT: Initial: 0x0 256 GOT-TLS-NEXT: Value: 0x0 257 GOT-TLS-NEXT: Type: None (0x0) 258 GOT-TLS-NEXT: Section: Undefined (0x0) 259 GOT-TLS-NEXT: Name: _ITM_registerTMCloneTable@ (78) 260 GOT-TLS-NEXT: } 261 GOT-TLS-NEXT: Entry { 262 GOT-TLS-NEXT: Address: 0x10C70 263 GOT-TLS-NEXT: Access: -32640 264 GOT-TLS-NEXT: Initial: 0x0 265 GOT-TLS-NEXT: Value: 0x0 266 GOT-TLS-NEXT: Type: None (0x0) 267 GOT-TLS-NEXT: Section: Undefined (0x0) 268 GOT-TLS-NEXT: Name: _Jv_RegisterClasses@ (119) 269 GOT-TLS-NEXT: } 270 GOT-TLS-NEXT: Entry { 271 GOT-TLS-NEXT: Address: 0x10C78 272 GOT-TLS-NEXT: Access: -32632 273 GOT-TLS-NEXT: Initial: 0x0 274 GOT-TLS-NEXT: Value: 0x0 275 GOT-TLS-NEXT: Type: Function (0x2) 276 GOT-TLS-NEXT: Section: Undefined (0x0) 277 GOT-TLS-NEXT: Name: __gmon_start__@ (23) 278 GOT-TLS-NEXT: } 279 GOT-TLS-NEXT: Entry { 280 GOT-TLS-NEXT: Address: 0x10C80 281 GOT-TLS-NEXT: Access: -32624 282 GOT-TLS-NEXT: Initial: 0xB60 283 GOT-TLS-NEXT: Value: 0xB60 284 GOT-TLS-NEXT: Type: Function (0x2) 285 GOT-TLS-NEXT: Section: Undefined (0x0) 286 GOT-TLS-NEXT: Name: __tls_get_addr (a] GLIBC_2.3 (150) 287 GOT-TLS-NEXT: } 288 GOT-TLS-NEXT: Entry { 289 GOT-TLS-NEXT: Address: 0x10C88 290 GOT-TLS-NEXT: Access: -32616 291 GOT-TLS-NEXT: Initial: 0x0 292 GOT-TLS-NEXT: Value: 0x0 293 GOT-TLS-NEXT: Type: None (0x0) 294 GOT-TLS-NEXT: Section: Undefined (0x0) 295 GOT-TLS-NEXT: Name: _ITM_deregisterTMCloneTable@ (50) 296 GOT-TLS-NEXT: } 297 GOT-TLS-NEXT: Entry { 298 GOT-TLS-NEXT: Address: 0x10C90 299 GOT-TLS-NEXT: Access: -32608 300 GOT-TLS-NEXT: Initial: 0x0 301 GOT-TLS-NEXT: Value: 0x0 302 GOT-TLS-NEXT: Type: Function (0x2) 303 GOT-TLS-NEXT: Section: Undefined (0x0) 304 GOT-TLS-NEXT: Name: __cxa_finalize (a] GLIBC_2.2 (104) 305 GOT-TLS-NEXT: } 306 GOT-TLS-NEXT: ] 307 GOT-TLS-NEXT: Number of TLS and multi-GOT entries: 4 308 GOT-TLS-NEXT: } 309 310 GOT-EMPTY: Primary GOT { 311 GOT-EMPTY-NEXT: Canonical gp value: 0x409FF0 312 GOT-EMPTY-NEXT: Reserved entries [ 313 GOT-EMPTY-NEXT: Entry { 314 GOT-EMPTY-NEXT: Address: 0x402000 315 GOT-EMPTY-NEXT: Access: -32752 316 GOT-EMPTY-NEXT: Initial: 0x0 317 GOT-EMPTY-NEXT: Purpose: Lazy resolver 318 GOT-EMPTY-NEXT: } 319 GOT-EMPTY-NEXT: Entry { 320 GOT-EMPTY-NEXT: Address: 0x402004 321 GOT-EMPTY-NEXT: Access: -32748 322 GOT-EMPTY-NEXT: Initial: 0x80000000 323 GOT-EMPTY-NEXT: Purpose: Module pointer (GNU extension) 324 GOT-EMPTY-NEXT: } 325 GOT-EMPTY-NEXT: ] 326 GOT-EMPTY-NEXT: Local entries [ 327 GOT-EMPTY-NEXT: ] 328 GOT-EMPTY-NEXT: Global entries [ 329 GOT-EMPTY-NEXT: ] 330 GOT-EMPTY-NEXT: Number of TLS and multi-GOT entries: 2 331 GOT-EMPTY-NEXT: } 332