brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 3caf5cc Raw
65 lines · plain
1# REQUIRES: mips2# Check calculation of MIPS GOT page address entries number3# when a linker script is provided.4 5# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux -o %t.o %s6# RUN: echo "SECTIONS { \7# RUN:          .text : { *(.text) } \8# RUN:          .data 0x10000 : { *(.data) } }" > %t.script9# RUN: ld.lld -shared --script %t.script -o %t.so %t.o10# RUN: llvm-readobj --symbols -A %t.so | FileCheck %s11 12# CHECK:      Name: foo113# CHECK-NEXT: Value: 0x1000014# CHECK:      Name: foo215# CHECK-NEXT: Value: 0x2000016# CHECK:      Name: foo317# CHECK-NEXT: Value: 0x3000018# CHECK:      Name: foo419# CHECK-NEXT: Value: 0x4000020 21# CHECK:      Local entries [22# CHECK-NEXT:    Entry {23# CHECK-NEXT:      Address:24# CHECK-NEXT:      Access:25# CHECK-NEXT:      Initial: 0x1000026# CHECK-NEXT:    }27# CHECK-NEXT:    Entry {28# CHECK-NEXT:      Address:29# CHECK-NEXT:      Access:30# CHECK-NEXT:      Initial: 0x2000031# CHECK-NEXT:    }32# CHECK-NEXT:    Entry {33# CHECK-NEXT:      Address:34# CHECK-NEXT:      Access:35# CHECK-NEXT:      Initial: 0x3000036# CHECK-NEXT:    }37# CHECK-NEXT:    Entry {38# CHECK-NEXT:      Address:39# CHECK-NEXT:      Access:40# CHECK-NEXT:      Initial: 0x4000041# CHECK-NEXT:    }42# CHECK-NEXT:    Entry {43# CHECK-NEXT:      Address:44# CHECK-NEXT:      Access:45# CHECK-NEXT:      Initial: 0x5000046# CHECK-NEXT:    }47# CHECK-NEXT:  ]48 49  .option pic250  .text51  ld      $v0,%got_page(foo1)($gp)52  ld      $v0,%got_page(foo2)($gp)53  ld      $v0,%got_page(foo3)($gp)54  ld      $v0,%got_page(foo4)($gp)55 56  .data57foo1:58  .space 0x1000059foo2:60  .space 0x1000061foo3:62  .space 0x1000063foo4:64  .word 065