[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / mips-got-redundant.s
blob2b6d1a6224da128043dcd7f089dca44ab5d5537d
1 # REQUIRES: mips
2 # Check number of redundant entries in the local part of MIPS GOT.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
5 # RUN: ld.lld %t.o -shared -o %t.so
6 # RUN: llvm-readelf -s -A %t.so | FileCheck %s
8 # CHECK: Symbol table '.symtab'
9 # CHECK: {{.*}}: [[VAL:[0-9a-f]+]] {{.*}} glb1
11 # CHECK: Primary GOT:
12 # CHECK: Local entries:
13 # CHECK-NEXT: Address Access Initial
14 # CHECK-NEXT: {{.*}} -32744(gp) 00020000
15 # CHECK-NEXT: {{.*}} -32740(gp) 00030000
16 # CHECK-NEXT: {{.*}} -32736(gp) 00040000
17 # CHECK-NEXT: {{.*}} -32732(gp) [[VAL]]
18 # CHECK-NOT: {{.*}} -32728(gp)
20 .text
21 .globl foo
22 foo:
23 lw $t0, %got(loc1)($gp)
24 addi $t0, $t0, %lo(loc1)
25 lw $t0, %got(loc2)($gp)
26 addi $t0, $t0, %lo(loc2)
27 lw $t0, %got(loc3)($gp)
28 addi $t0, $t0, %lo(loc3)
29 lw $t0, %got(loc4)($gp)
30 addi $t0, $t0, %lo(loc4)
31 lw $t0, %got(glb1)($gp)
32 lw $t0, %got(glb1)($gp)
34 .section .data.1,"aw",%progbits
35 loc1:
36 .space 0x10000
37 loc2:
38 .word 0
39 loc3:
40 .word 0
41 .global glb1
42 .hidden glb1
43 glb1:
44 .word 0
46 .section .data.2,"aw",%progbits
47 loc4:
48 .word 0