2 # Check less-significant bit setup for microMIPS PLT.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
5 # RUN: -mattr=micromips %S/Inputs/mips-dynamic.s -o %t-dso.o
6 # RUN: ld.lld %t-dso.o -shared -soname=t.so -o %t.so
7 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
8 # RUN: -mattr=micromips %s -o %t-exe.o
9 # RUN: echo "SECTIONS { \
10 # RUN: . = 0x20000; .text ALIGN(0x100) : { *(.text) } \
11 # RUN: . = 0x20300; .plt : { *(.plt) } \
13 # RUN: ld.lld %t-exe.o %t.so --script %t.script -o %t.exe
14 # RUN: llvm-readelf --symbols --dyn-syms -A %t.exe | FileCheck %s
15 # RUN: llvm-objdump --no-print-imm-hex -d --mattr=micromips --no-show-raw-insn %t.exe \
16 # RUN: | FileCheck --check-prefix=ASM %s
18 # CHECK: Symbol table '.dynsym'
19 # CHECK: Num: Value Size Type Bind Vis Ndx Name
20 # CHECK: 1: 00020321 0 FUNC GLOBAL DEFAULT [<other: 0x88>] UND foo0
22 # CHECK: Symbol table '.symtab'
23 # CHECK: Num: Value Size Type Bind Vis Ndx Name
24 # CHECK: 1: 00020210 0 NOTYPE LOCAL HIDDEN [<other: 0x82>] 8 foo
25 # CHECK: 4: 00020200 0 NOTYPE GLOBAL DEFAULT [<other: 0x80>] 8 __start
26 # CHECK: 5: 00020320 0 FUNC GLOBAL DEFAULT [<other: 0x88>] UND foo0
29 # CHECK: Local entries:
30 # CHECK: Address Access Initial
31 # CHECK: -32744(gp) 00020211
35 # CHECK: Address Initial Sym.Val. Type Ndx Name
36 # CHECK: 00020301 00020321 FUNC UND foo0
39 # ASM-NEXT: 20200: lw $8, -32744($gp)
40 # ASM-NEXT: addi $8, $8, 529
42 # ASM-NEXT: addi $8, $8, 801
45 # ASM-NEXT: 20210: jal 0x20320
56 addi $t0
,$t0
,%lo
(foo0
)