brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · e1ff56b Raw
59 lines · plain
1# REQUIRES: mips2# Check less-significant bit setup for microMIPS PLT.3 4# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \5# RUN:         -mattr=micromips %S/Inputs/mips-dynamic.s -o %t-dso.o6# RUN: ld.lld %t-dso.o -shared -soname=t.so -o %t.so7# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \8# RUN:         -mattr=micromips %s -o %t-exe.o9# RUN: echo "SECTIONS { \10# RUN:         . = 0x20000;  .text ALIGN(0x100) : { *(.text) } \11# RUN:         . = 0x20300;  .plt : { *(.plt) } \12# RUN:       }" > %t.script13# RUN: ld.lld %t-exe.o %t.so --script %t.script -o %t.exe14# RUN: llvm-readelf --symbols --dyn-syms -A %t.exe | FileCheck %s15# RUN: llvm-objdump --no-print-imm-hex -d --mattr=micromips --no-show-raw-insn %t.exe \16# RUN:   | FileCheck --check-prefix=ASM %s17 18# CHECK: Symbol table '.dynsym'19# CHECK:    Num:    Value  Size Type    Bind   Vis                    Ndx Name20# CHECK:      1: 00020321     0 FUNC    GLOBAL DEFAULT [<other: 0x88>] UND foo021 22# CHECK: Symbol table '.symtab'23# CHECK:    Num:    Value  Size Type    Bind   Vis                    Ndx Name24# CHECK:      1: 00020210     0 NOTYPE  LOCAL  HIDDEN [<other: 0x82>]   8 foo25# CHECK:      4: 00020200     0 NOTYPE  GLOBAL DEFAULT [<other: 0x80>]   8 __start26# CHECK:      5: 00020320     0 FUNC    GLOBAL DEFAULT [<other: 0x88>] UND foo027 28# CHECK: Primary GOT:29# CHECK:  Local entries:30# CHECK:    Address     Access  Initial31# CHECK:            -32744(gp) 0002021132 33# CHECK: PLT GOT:34# CHECK:  Entries:35# CHECK:    Address  Initial Sym.Val. Type    Ndx Name36# CHECK:            00020301 00020321 FUNC    UND foo037 38# ASM:      <__start>:39# ASM-NEXT:    20200:  lw      $8, -32744($gp)40# ASM-NEXT:            addi    $8, $8, 52941# ASM-NEXT:            lui     $8, 242# ASM-NEXT:            addi    $8, $8, 80143#44# ASM:      <foo>:45# ASM-NEXT:    20210:  jal     0x2032046 47  .text48  .set micromips49  .global foo50  .hidden foo51  .global __start52__start:53  lw    $t0,%got(foo)($gp)54  addi  $t0,$t0,%lo(foo)55  lui   $t0,%hi(foo0)56  addi  $t0,$t0,%lo(foo0)57foo:58  jal   foo059