brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 1233e28 Raw
50 lines · plain
1# REQUIRES: mips2# Check R_MIPS_26 relocation handling in case of N64 ABIs.3 4# RUN: echo "SECTIONS { \5# RUN:         . = 0x10000; .text ALIGN(0x10000) : { *(.text) } \6# RUN:         . = 0x30000; .data                : { *(.data) } \7# RUN:       }" > %t.script8 9# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux \10# RUN:         %S/Inputs/mips-dynamic.s -o %t-so.o11# RUN: ld.lld %t-so.o -shared -soname=t.so -o %t.so12# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t.o13# RUN: ld.lld %t.o %t.so -script %t.script -o %t.exe14# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.exe \15# RUN:   | FileCheck %s --check-prefixes=CHECK,DEFAULT16# RUN: ld.lld %t-so.o -shared -soname=t.so -o %t.so -z hazardplt17# RUN: ld.lld %t.o %t.so -script %t.script -o %t.exe -z hazardplt18# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.exe \19# RUN:   | FileCheck %s --check-prefixes=CHECK,HAZARDPLT20 21# CHECK:      Disassembly of section .text:22# CHECK-EMPTY:23# CHECK-NEXT: <__start>:24# CHECK-NEXT:    20000:       jal     0x2003025# CHECK-NEXT:    20004:       nop26# CHECK-EMPTY:27# CHECK-NEXT: Disassembly of section .plt:28# CHECK-EMPTY:29# CHECK-NEXT: <.plt>:30# CHECK-NEXT:    20010:       lui     $14, 331# CHECK-NEXT:    20014:       ld      $25, 8($14)32# CHECK-NEXT:    20018:       addiu   $14, $14, 833# CHECK-NEXT:    2001c:       subu    $24, $24, $1434# CHECK-NEXT:    20020:       move    $15, $ra35# CHECK-NEXT:    20024:       srl     $24, $24, 336# DEFAULT:       20028:       jalr    $2537# HAZARDPLT:     20028:       jalr.hb $2538# CHECK-NEXT:    2002c:       addiu   $24, $24, -239# CHECK-NEXT:    20030:       lui     $15, 340# CHECK-NEXT:    20034:       ld      $25, 24($15)41# DEFAULT:       20038:       jr      $2542# HAZARDPLT:     20038:       jr.hb   $2543# CHECK-NEXT:    2003c:       daddiu  $24, $15, 2444 45  .text46  .option pic047  .global __start48__start:49  jal   foo050