brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · eb65c34 Raw
51 lines · plain
1# REQUIRES: mips2# Check PLT entries generation in case of R6 ABI version.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=mips-unknown-linux \10# RUN:         -mcpu=mips32r6 %s -o %t1.o11# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \12# RUN:         -mcpu=mips32r6 %S/Inputs/mips-dynamic.s -o %t2.o13# RUN: ld.lld %t2.o -shared -soname=t.so -o %t.so14# RUN: ld.lld %t1.o %t.so -script %t.script -o %t.exe15# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t.exe | FileCheck %s --check-prefixes=DEFAULT,CHECK16# RUN: ld.lld %t2.o -shared -soname=t.so -o %t.so -z hazardplt17# RUN: ld.lld %t1.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 | FileCheck %s --check-prefixes=HAZARDPLT,CHECK19 20# CHECK:      Disassembly of section .text:21# CHECK-EMPTY:22# CHECK-NEXT: <__start>:23# CHECK-NEXT:   20000:       jal     0x2003024#                                    ^-- 0x20030 gotplt[foo0]25# CHECK-NEXT:   20004:       nop26#27# CHECK-EMPTY:28# CHECK-NEXT: Disassembly of section .plt:29# CHECK-EMPTY:30# CHECK-NEXT: <.plt>:31# CHECK-NEXT:   20010:       aui     $gp, $zero, 332# CHECK-NEXT:   20014:       lw      $25, 4($gp)33# CHECK-NEXT:   20018:       addiu   $gp, $gp, 434# CHECK-NEXT:   2001c:       subu    $24, $24, $gp35# CHECK-NEXT:   20020:       move    $15, $ra36# CHECK-NEXT:   20024:       srl     $24, $24, 237# DEFAULT:      20028:       jalr    $2538# HAZARDPLT:    20028:       jalr.hb $2539# CHECK-NEXT:   2002c:       addiu   $24, $24, -240 41# CHECK-NEXT:   20030:       aui     $15, $zero, 342# CHECK-NEXT:   20034:       lw      $25, 12($15)43# DEFAULT:      20038:       jr      $2544# HAZARDPLT:    20038:       jr.hb   $2545# CHECK-NEXT:   2003c:       addiu   $24, $15, 1246 47  .text48  .global __start49__start:50  jal foo0        # R_MIPS_26 against 'foo0' from DSO51