locals-duplicate.test 23.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
; RUN: llc -filetype=obj %p/Inputs/locals-duplicate1.ll -o %t1.o
; RUN: llc -filetype=obj %p/Inputs/locals-duplicate2.ll -o %t2.o
; RUN: wasm-ld --export-dynamic --no-entry -o %t.wasm %t1.o %t2.o
; RUN: obj2yaml %t.wasm | FileCheck %s

; CHECK:      --- !WASM
; CHECK-NEXT: FileHeader:
; CHECK-NEXT:   Version:         0x00000001
; CHECK-NEXT: Sections:
; CHECK-NEXT:   - Type:            TYPE
; CHECK-NEXT:     Signatures:
; CHECK-NEXT:       - Index:           0
; CHECK-NEXT:         ParamTypes:      []
; CHECK-NEXT:         ReturnTypes:
; CHECK-NEXT:           - I32
; CHECK-NEXT:   - Type:            FUNCTION
; CHECK-NEXT:     FunctionTypes:   [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
; CHECK-NEXT:                        0, 0 ]
; CHECK-NEXT:   - Type:            TABLE
; CHECK-NEXT:     Tables:
; CHECK-NEXT:       - ElemType:        FUNCREF
; CHECK-NEXT:         Limits:
; CHECK-NEXT:           Flags:           [ HAS_MAX ]
; CHECK-NEXT:           Initial:         0x00000007
; CHECK-NEXT:           Maximum:         0x00000007
; CHECK-NEXT:   - Type:            MEMORY
; CHECK-NEXT:     Memories:
; CHECK-NEXT:       - Initial:         0x00000002
; CHECK-NEXT:   - Type:            GLOBAL
; CHECK-NEXT:     Globals:
; CHECK-NEXT:       - Index:           0
; CHECK-NEXT:         Type:            I32
; CHECK-NEXT:         Mutable:         true
; CHECK-NEXT:         InitExpr:
; CHECK-NEXT:           Opcode:          I32_CONST
; CHECK-NEXT:           Value:           66592
; CHECK-NEXT:       - Index:           1
; CHECK-NEXT:         Type:            I32
; CHECK-NEXT:         Mutable:         false
; CHECK-NEXT:         InitExpr:
; CHECK-NEXT:           Opcode:          I32_CONST
; CHECK-NEXT:           Value:           1028
; CHECK-NEXT:       - Index:           2
; CHECK-NEXT:         Type:            I32
; CHECK-NEXT:         Mutable:         false
; CHECK-NEXT:         InitExpr:
; CHECK-NEXT:           Opcode:          I32_CONST
; CHECK-NEXT:           Value:           1036
; CHECK-NEXT:   - Type:            EXPORT
; CHECK-NEXT:     Exports:
; CHECK-NEXT:       - Name:            memory
; CHECK-NEXT:         Kind:            MEMORY
; CHECK-NEXT:         Index:           0
; CHECK-NEXT:       - Name:            colliding_func2
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           1
; CHECK-NEXT:       - Name:            get_global1A
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           3
; CHECK-NEXT:       - Name:            get_global2A
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           4
; CHECK-NEXT:       - Name:            colliding_global2
; CHECK-NEXT:         Kind:            GLOBAL
; CHECK-NEXT:         Index:           1
; CHECK-NEXT:       - Name:            get_global3A
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           5
; CHECK-NEXT:       - Name:            get_func1A
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           6
; CHECK-NEXT:       - Name:            get_func2A
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           7
; CHECK-NEXT:       - Name:            get_func3A
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           8
; CHECK-NEXT:       - Name:            colliding_func1
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           9
; CHECK-NEXT:       - Name:            get_global1B
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           12
; CHECK-NEXT:       - Name:            colliding_global1
; CHECK-NEXT:         Kind:            GLOBAL
; CHECK-NEXT:         Index:           2
; CHECK-NEXT:       - Name:            get_global2B
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           13
; CHECK-NEXT:       - Name:            get_global3B
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           14
; CHECK-NEXT:       - Name:            get_func1B
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           15
; CHECK-NEXT:       - Name:            get_func2B
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           16
; CHECK-NEXT:       - Name:            get_func3B
; CHECK-NEXT:         Kind:            FUNCTION
; CHECK-NEXT:         Index:           17
; CHECK-NEXT:   - Type:            ELEM
; CHECK-NEXT:     Segments:
; CHECK-NEXT:       - Offset:
; CHECK-NEXT:           Opcode:          I32_CONST
; CHECK-NEXT:           Value:           1
; CHECK-NEXT:         Functions:       [ 0, 1, 2, 9, 10, 11 ]
; CHECK-NEXT:   - Type:            CODE
; CHECK-NEXT:     Functions:
; CHECK-NEXT:       - Index:           0
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            41020B
; CHECK-NEXT:       - Index:           1
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            41020B
; CHECK-NEXT:       - Index:           2
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            41020B
; CHECK-NEXT:       - Index:           3
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4180888080000B
; CHECK-NEXT:       - Index:           4
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4184888080000B
; CHECK-NEXT:       - Index:           5
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4188888080000B
; CHECK-NEXT:       - Index:           6
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4181808080000B
; CHECK-NEXT:       - Index:           7
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4182808080000B
; CHECK-NEXT:       - Index:           8
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4183808080000B
; CHECK-NEXT:       - Index:           9
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            41020B
; CHECK-NEXT:       - Index:           10
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            41020B
; CHECK-NEXT:       - Index:           11
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            41020B
; CHECK-NEXT:       - Index:           12
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            418C888080000B
; CHECK-NEXT:       - Index:           13
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4190888080000B
; CHECK-NEXT:       - Index:           14
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4194888080000B
; CHECK-NEXT:       - Index:           15
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4184808080000B
; CHECK-NEXT:       - Index:           16
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4185808080000B
; CHECK-NEXT:       - Index:           17
; CHECK-NEXT:         Locals:
; CHECK-NEXT:         Body:            4186808080000B
; CHECK-NEXT:   - Type:            DATA
; CHECK-NEXT:     Segments:
; CHECK-NEXT:       - SectionOffset:   7
; CHECK-NEXT:         InitFlags:       0
; CHECK-NEXT:         Offset:
; CHECK-NEXT:           Opcode:          I32_CONST
; CHECK-NEXT:           Value:           1024
; CHECK-NEXT:         Content:         '010000000100000001000000010000000100000001000000'
; CHECK-NEXT:   - Type:            CUSTOM
; CHECK-NEXT:     Name:            name
; CHECK-NEXT:     FunctionNames:
; CHECK-NEXT:       - Index:           0
; CHECK-NEXT:         Name:            colliding_func1
; CHECK-NEXT:       - Index:           1
; CHECK-NEXT:         Name:            colliding_func2
; CHECK-NEXT:       - Index:           2
; CHECK-NEXT:         Name:            colliding_func3
; CHECK-NEXT:       - Index:           3
; CHECK-NEXT:         Name:            get_global1A
; CHECK-NEXT:       - Index:           4
; CHECK-NEXT:         Name:            get_global2A
; CHECK-NEXT:       - Index:           5
; CHECK-NEXT:         Name:            get_global3A
; CHECK-NEXT:       - Index:           6
; CHECK-NEXT:         Name:            get_func1A
; CHECK-NEXT:       - Index:           7
; CHECK-NEXT:         Name:            get_func2A
; CHECK-NEXT:       - Index:           8
; CHECK-NEXT:         Name:            get_func3A
; CHECK-NEXT:       - Index:           9
; CHECK-NEXT:         Name:            colliding_func1
; CHECK-NEXT:       - Index:           10
; CHECK-NEXT:         Name:            colliding_func2
; CHECK-NEXT:       - Index:           11
; CHECK-NEXT:         Name:            colliding_func3
; CHECK-NEXT:       - Index:           12
; CHECK-NEXT:         Name:            get_global1B
; CHECK-NEXT:       - Index:           13
; CHECK-NEXT:         Name:            get_global2B
; CHECK-NEXT:       - Index:           14
; CHECK-NEXT:         Name:            get_global3B
; CHECK-NEXT:       - Index:           15
; CHECK-NEXT:         Name:            get_func1B
; CHECK-NEXT:       - Index:           16
; CHECK-NEXT:         Name:            get_func2B
; CHECK-NEXT:       - Index:           17
; CHECK-NEXT:         Name:            get_func3B
; CHECK-NEXT: ...


; RUN: wasm-ld -r --no-entry -o %t.reloc.wasm %t1.o %t2.o
; RUN: obj2yaml %t.reloc.wasm | FileCheck -check-prefix=RELOC %s

; RELOC:      --- !WASM
; RELOC-NEXT: FileHeader:
; RELOC-NEXT:   Version:         0x00000001
; RELOC-NEXT: Sections:
; RELOC-NEXT:   - Type:            TYPE
; RELOC-NEXT:     Signatures:
; RELOC-NEXT:       - Index:           0
; RELOC-NEXT:         ParamTypes:      []
; RELOC-NEXT:         ReturnTypes:
; RELOC-NEXT:           - I32
; RELOC-NEXT:   - Type:            FUNCTION
; RELOC-NEXT:     FunctionTypes:   [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
; RELOC-NEXT:                        0, 0 ]
; RELOC-NEXT:   - Type:            TABLE
; RELOC-NEXT:     Tables:
; RELOC-NEXT:       - ElemType:        FUNCREF
; RELOC-NEXT:         Limits:
; RELOC-NEXT:           Flags:           [ HAS_MAX ]
; RELOC-NEXT:           Initial:         0x00000007
; RELOC-NEXT:           Maximum:         0x00000007
; RELOC-NEXT:   - Type:            MEMORY
; RELOC-NEXT:     Memories:
; RELOC-NEXT:       - Initial:         0x00000001
; RELOC-NEXT:   - Type:            ELEM
; RELOC-NEXT:     Segments:
; RELOC-NEXT:       - Offset:
; RELOC-NEXT:           Opcode:          I32_CONST
; RELOC-NEXT:           Value:           1
; RELOC-NEXT:         Functions:       [ 0, 1, 2, 9, 10, 11 ]
; RELOC-NEXT:   - Type:            CODE
; RELOC-NEXT:     Relocations:
; RELOC-NEXT:       - Type:            R_WASM_MEMORY_ADDR_SLEB
; RELOC-NEXT:         Index:           18
; RELOC-NEXT:         Offset:          0x00000013
; RELOC-NEXT:       - Type:            R_WASM_MEMORY_ADDR_SLEB
; RELOC-NEXT:         Index:           3
; RELOC-NEXT:         Offset:          0x0000001C
; RELOC-NEXT:       - Type:            R_WASM_MEMORY_ADDR_SLEB
; RELOC-NEXT:         Index:           19
; RELOC-NEXT:         Offset:          0x00000025
; RELOC-NEXT:       - Type:            R_WASM_TABLE_INDEX_SLEB
; RELOC-NEXT:         Index:           16
; RELOC-NEXT:         Offset:          0x0000002E
; RELOC-NEXT:       - Type:            R_WASM_TABLE_INDEX_SLEB
; RELOC-NEXT:         Index:           0
; RELOC-NEXT:         Offset:          0x00000037
; RELOC-NEXT:       - Type:            R_WASM_TABLE_INDEX_SLEB
; RELOC-NEXT:         Index:           17
; RELOC-NEXT:         Offset:          0x00000040
; RELOC-NEXT:       - Type:            R_WASM_MEMORY_ADDR_SLEB
; RELOC-NEXT:         Index:           10
; RELOC-NEXT:         Offset:          0x00000058
; RELOC-NEXT:       - Type:            R_WASM_MEMORY_ADDR_SLEB
; RELOC-NEXT:         Index:           22
; RELOC-NEXT:         Offset:          0x00000061
; RELOC-NEXT:       - Type:            R_WASM_MEMORY_ADDR_SLEB
; RELOC-NEXT:         Index:           23
; RELOC-NEXT:         Offset:          0x0000006A
; RELOC-NEXT:       - Type:            R_WASM_TABLE_INDEX_SLEB
; RELOC-NEXT:         Index:           8
; RELOC-NEXT:         Offset:          0x00000073
; RELOC-NEXT:       - Type:            R_WASM_TABLE_INDEX_SLEB
; RELOC-NEXT:         Index:           20
; RELOC-NEXT:         Offset:          0x0000007C
; RELOC-NEXT:       - Type:            R_WASM_TABLE_INDEX_SLEB
; RELOC-NEXT:         Index:           21
; RELOC-NEXT:         Offset:          0x00000085
; RELOC-NEXT:     Functions:
; RELOC-NEXT:       - Index:           0
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            41020B
; RELOC-NEXT:       - Index:           1
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            41020B
; RELOC-NEXT:       - Index:           2
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            41020B
; RELOC-NEXT:       - Index:           3
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4180808080000B
; RELOC-NEXT:       - Index:           4
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4188808080000B
; RELOC-NEXT:       - Index:           5
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4190808080000B
; RELOC-NEXT:       - Index:           6
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4181808080000B
; RELOC-NEXT:       - Index:           7
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4182808080000B
; RELOC-NEXT:       - Index:           8
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4183808080000B
; RELOC-NEXT:       - Index:           9
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            41020B
; RELOC-NEXT:       - Index:           10
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            41020B
; RELOC-NEXT:       - Index:           11
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            41020B
; RELOC-NEXT:       - Index:           12
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4184808080000B
; RELOC-NEXT:       - Index:           13
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            418C808080000B
; RELOC-NEXT:       - Index:           14
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4194808080000B
; RELOC-NEXT:       - Index:           15
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4184808080000B
; RELOC-NEXT:       - Index:           16
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4185808080000B
; RELOC-NEXT:       - Index:           17
; RELOC-NEXT:         Locals:
; RELOC-NEXT:         Body:            4186808080000B
; RELOC-NEXT:   - Type:            DATA
; RELOC-NEXT:     Segments:
; RELOC-NEXT:       - SectionOffset:   6
; RELOC-NEXT:         InitFlags:       0
; RELOC-NEXT:         Offset:
; RELOC-NEXT:           Opcode:          I32_CONST
; RELOC-NEXT:           Value:           0
; RELOC-NEXT:         Content:         '0100000001000000'
; RELOC-NEXT:       - SectionOffset:   19
; RELOC-NEXT:         InitFlags:       0
; RELOC-NEXT:         Offset:
; RELOC-NEXT:           Opcode:          I32_CONST
; RELOC-NEXT:           Value:           8
; RELOC-NEXT:         Content:         '0100000001000000'
; RELOC-NEXT:       - SectionOffset:   32
; RELOC-NEXT:         InitFlags:       0
; RELOC-NEXT:         Offset:
; RELOC-NEXT:           Opcode:          I32_CONST
; RELOC-NEXT:           Value:           16
; RELOC-NEXT:         Content:         '0100000001000000'
; RELOC-NEXT:   - Type:            CUSTOM
; RELOC-NEXT:     Name:            linking
; RELOC-NEXT:     Version:         2
; RELOC-NEXT:     SymbolTable:
; RELOC-NEXT:       - Index:           0
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            colliding_func2
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        1
; RELOC-NEXT:       - Index:           1
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_global1A
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        3
; RELOC-NEXT:       - Index:           2
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_global2A
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        4
; RELOC-NEXT:       - Index:           3
; RELOC-NEXT:         Kind:            DATA
; RELOC-NEXT:         Name:            colliding_global2
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Segment:         1
; RELOC-NEXT:         Size:            4
; RELOC-NEXT:       - Index:           4
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_global3A
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        5
; RELOC-NEXT:       - Index:           5
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_func1A
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        6
; RELOC-NEXT:       - Index:           6
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_func2A
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        7
; RELOC-NEXT:       - Index:           7
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_func3A
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        8
; RELOC-NEXT:       - Index:           8
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            colliding_func1
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        9
; RELOC-NEXT:       - Index:           9
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_global1B
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        12
; RELOC-NEXT:       - Index:           10
; RELOC-NEXT:         Kind:            DATA
; RELOC-NEXT:         Name:            colliding_global1
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Segment:         0
; RELOC-NEXT:         Offset:          4
; RELOC-NEXT:         Size:            4
; RELOC-NEXT:       - Index:           11
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_global2B
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        13
; RELOC-NEXT:       - Index:           12
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_global3B
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        14
; RELOC-NEXT:       - Index:           13
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_func1B
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        15
; RELOC-NEXT:       - Index:           14
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_func2B
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        16
; RELOC-NEXT:       - Index:           15
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            get_func3B
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:         Function:        17
; RELOC-NEXT:       - Index:           16
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            colliding_func1
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Function:        0
; RELOC-NEXT:       - Index:           17
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            colliding_func3
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Function:        2
; RELOC-NEXT:       - Index:           18
; RELOC-NEXT:         Kind:            DATA
; RELOC-NEXT:         Name:            colliding_global1
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Segment:         0
; RELOC-NEXT:         Size:            4
; RELOC-NEXT:       - Index:           19
; RELOC-NEXT:         Kind:            DATA
; RELOC-NEXT:         Name:            colliding_global3
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Segment:         2
; RELOC-NEXT:         Size:            4
; RELOC-NEXT:       - Index:           20
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            colliding_func2
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Function:        10
; RELOC-NEXT:       - Index:           21
; RELOC-NEXT:         Kind:            FUNCTION
; RELOC-NEXT:         Name:            colliding_func3
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Function:        11
; RELOC-NEXT:       - Index:           22
; RELOC-NEXT:         Kind:            DATA
; RELOC-NEXT:         Name:            colliding_global2
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Segment:         1
; RELOC-NEXT:         Offset:          4
; RELOC-NEXT:         Size:            4
; RELOC-NEXT:       - Index:           23
; RELOC-NEXT:         Kind:            DATA
; RELOC-NEXT:         Name:            colliding_global3
; RELOC-NEXT:         Flags:           [ BINDING_LOCAL ]
; RELOC-NEXT:         Segment:         2
; RELOC-NEXT:         Offset:          4
; RELOC-NEXT:         Size:            4
; RELOC-NEXT:     SegmentInfo:
; RELOC-NEXT:       - Index:           0
; RELOC-NEXT:         Name:            .data.colliding_global1
; RELOC-NEXT:         Alignment:       2
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:       - Index:           1
; RELOC-NEXT:         Name:            .data.colliding_global2
; RELOC-NEXT:         Alignment:       2
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:       - Index:           2
; RELOC-NEXT:         Name:            .data.colliding_global3
; RELOC-NEXT:         Alignment:       2
; RELOC-NEXT:         Flags:           [  ]
; RELOC-NEXT:   - Type:            CUSTOM
; RELOC-NEXT:     Name:            name
; RELOC-NEXT:     FunctionNames:
; RELOC-NEXT:       - Index:           0
; RELOC-NEXT:         Name:            colliding_func1
; RELOC-NEXT:       - Index:           1
; RELOC-NEXT:         Name:            colliding_func2
; RELOC-NEXT:       - Index:           2
; RELOC-NEXT:         Name:            colliding_func3
; RELOC-NEXT:       - Index:           3
; RELOC-NEXT:         Name:            get_global1A
; RELOC-NEXT:       - Index:           4
; RELOC-NEXT:         Name:            get_global2A
; RELOC-NEXT:       - Index:           5
; RELOC-NEXT:         Name:            get_global3A
; RELOC-NEXT:       - Index:           6
; RELOC-NEXT:         Name:            get_func1A
; RELOC-NEXT:       - Index:           7
; RELOC-NEXT:         Name:            get_func2A
; RELOC-NEXT:       - Index:           8
; RELOC-NEXT:         Name:            get_func3A
; RELOC-NEXT:       - Index:           9
; RELOC-NEXT:         Name:            colliding_func1
; RELOC-NEXT:       - Index:           10
; RELOC-NEXT:         Name:            colliding_func2
; RELOC-NEXT:       - Index:           11
; RELOC-NEXT:         Name:            colliding_func3
; RELOC-NEXT:       - Index:           12
; RELOC-NEXT:         Name:            get_global1B
; RELOC-NEXT:       - Index:           13
; RELOC-NEXT:         Name:            get_global2B
; RELOC-NEXT:       - Index:           14
; RELOC-NEXT:         Name:            get_global3B
; RELOC-NEXT:       - Index:           15
; RELOC-NEXT:         Name:            get_func1B
; RELOC-NEXT:       - Index:           16
; RELOC-NEXT:         Name:            get_func2B
; RELOC-NEXT:       - Index:           17
; RELOC-NEXT:         Name:            get_func3B
; RELOC-NEXT: ...