[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / mips-got-extsym.s
blob7dd2841bee79c79b4c00833800b45e00f307ed43
1 # REQUIRES: mips
2 # Check creation of GOT entries for global symbols in case of executable
3 # file linking. Symbols defined in DSO should get entries in the global part
4 # of the GOT. Symbols defined in the executable itself should get local GOT
5 # entries and does not need a row in .dynsym table.
7 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
8 # RUN: %S/Inputs/mips-dynamic.s -o %t.so.o
9 # RUN: ld.lld -shared %t.so.o -o %t.so
10 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
11 # RUN: ld.lld %t.o %t.so -o %t.exe
12 # RUN: llvm-readelf --dyn-syms --symbols -A %t.exe | FileCheck %s
14 # CHECK: Symbol table '.dynsym'
15 # CHECK-NOT: bar
17 # CHECK: Symbol table '.symtab'
18 # CHECK: {{.*}}: [[BAR:[0-9a-f]+]] {{.*}} bar
19 # CHECK: {{.*}}: 00000000 {{.*}} _foo
21 # CHECK: Primary GOT:
22 # CHECK: Local entries:
23 # CHECK-NEXT: Address Access Initial
24 # CHECK-NEXT: {{.*}} -32744(gp) [[BAR]]
25 # CHECK-EMPTY:
26 # CHECK-NEXT: Global entries:
27 # CHECK-NEXT: Address Access Initial Sym.Val. Type Ndx Name
28 # CHECK-NEXT: {{.*}} -32740(gp) 00000000 00000000 NOTYPE UND _foo
30 .text
31 .globl __start
32 __start:
33 lw $t0,%got(bar)($gp)
34 lw $t0,%got(_foo)($gp)
36 .global bar
37 bar:
38 .word 0