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'
17 # CHECK: Symbol table '.symtab'
18 # CHECK: {{.*}}: [[BAR:[0-9a-f]+]] {{.*}} bar
19 # CHECK: {{.*}}: 00000000 {{.*}} _foo
22 # CHECK: Local entries:
23 # CHECK-NEXT: Address Access Initial
24 # CHECK-NEXT: {{.*}} -32744(gp) [[BAR]]
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
34 lw $t0
,%got
(_foo
)($gp
)