30 lines · plain
1# REQUIRES: mips2# Check R_MIPS_CALL16 relocation calculation.3 4# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o5# RUN: ld.lld %t.o -shared -o %t.so6# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.so | FileCheck %s7# RUN: llvm-readelf -A --symbols %t.so | FileCheck -check-prefix=GOT %s8 9 .text10 .globl __start11__start:12 lw $t0,%call16(g1)($gp)13 14 .globl g115 .type g1,@function16g1:17 nop18 19# CHECK: Disassembly of section .text:20# CHECK-EMPTY:21# CHECK-NEXT: <__start>:22# CHECK-NEXT: {{.*}}: lw $8, -3274423 24# GOT: Symbol table '.symtab'25# GOT: {{.*}}: [[G1:[0-9a-f]+]] {{.*}} g126 27# GOT: Primary GOT:28# GOT: Global entries:29# GOT: {{.*}} -32744(gp) [[G1]] [[G1]] FUNC 7 g130