brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · ebfad06 Raw
45 lines · plain
1# REQUIRES: mips2# Check R_MIPS_64 relocation calculation.3 4# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t-be.o5# RUN: ld.lld -shared %t-be.o -o %t-be.so6# RUN: llvm-objdump -s -t %t-be.so | FileCheck --check-prefixes=SYM,SYM-BE %s7# RUN: llvm-readelf --dynamic-table -r -s -A %t-be.so | FileCheck %s8 9# RUN: llvm-mc -filetype=obj -triple=mips64el-unknown-linux %s -o %t-el.o10# RUN: ld.lld -shared %t-el.o -o %t-el.so11# RUN: llvm-objdump -s -t %t-el.so | FileCheck --check-prefixes=SYM,SYM-EL %s12# RUN: llvm-readelf --dynamic-table -r -s -A %t-el.so | FileCheck %s13 14  .data15  .globl v216v1:17  .quad v2+8 # R_MIPS_64 target v2 addend 818v2:19  .quad v1   # R_MIPS_64 target v1 addend 020 21# SYM: SYMBOL TABLE:22# SYM: 00000000000203b0 l .data  0000000000000000 v123 24# SYM-BE: Contents of section .data:25# SYM-BE-NEXT:  {{.*}} 00000000 00000008 00000000 000203b026 27# SYM-EL: Contents of section .data:28# SYM-EL-NEXT:  {{.*}} 08000000 00000000 b0030200 0000000029 30# CHECK: Dynamic section31# CHECK: (RELSZ)   32 (bytes)32# CHECK: (RELENT)  16 (bytes)33 34# CHECK: Relocation section35# CHECK:      [[V1:[0-9a-f]+]]  {{.*}} R_MIPS_REL32/R_MIPS_64/R_MIPS_NONE [[V2:[0-9a-f]+]] v236# CHECK-NEXT: [[V2]]            {{.*}} R_MIPS_REL32/R_MIPS_64/R_MIPS_NONE {{$}}37 38# CHECK: Symbol table '.symtab'39# CHECK: {{.*}}: [[V1]]  {{.*}}  v140# CHECK: {{.*}}: [[V2]]  {{.*}}  v241 42# CHECK: Primary GOT:43# CHECK:  Global entries:44# CHECK:   {{.*}} -32736(gp) [[V2]] [[V2]] {{.*}} v245