brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 61f1dbf Raw
52 lines · plain
1# REQUIRES: mips2# Check R_MIPS_32 relocation calculation.3 4# RUN: echo "SECTIONS { \5# RUN:         . = 0x10000; .data ALIGN(0x1000) : { *(.data) } \6# RUN:       }" > %t.script7 8# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t-be.o9# RUN: ld.lld -shared %t-be.o -script %t.script -o %t-be.so10# RUN: llvm-objdump -t -s %t-be.so | FileCheck --check-prefixes=SYM,BE %s11# RUN: llvm-readelf -r -s --dynamic-table -A %t-be.so \12# RUN:   | FileCheck -check-prefix=REL %s13 14# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s -o %t-el.o15# RUN: ld.lld -shared %t-el.o -script %t.script -o %t-el.so16# RUN: llvm-objdump -t -s %t-el.so | FileCheck --check-prefixes=SYM,EL %s17# RUN: llvm-readelf --dynamic-table -r -s -A %t-el.so \18# RUN:   | FileCheck -check-prefix=REL %s19 20  .data21  .globl v222v1:23  .word v2+4 # R_MIPS_32 target v2 addend 424v2:25  .word v1   # R_MIPS_32 target v1 addend 026 27# SYM: SYMBOL TABLE:28# SYM: 00011000 l .data  00000000 v129 30# BE: Contents of section .data:31# BE-NEXT: {{.*}} 00000004 0001100032#                 ^-- v2+4 ^-- v133 34# EL: Contents of section .data:35# EL-NEXT: {{.*}} 04000000 0010010036#                 ^-- v2+4 ^-- v137 38# REL: Dynamic section39# REL:     (RELSZ)    1640# REL:     (RELENT)    841# REL-NOT: (RELCOUNT)42 43# REL: Relocation section44# REL:      {{.*}} R_MIPS_REL32 [[V2:[0-9a-f]+]]45# REL-NEXT: {{.*}} R_MIPS_REL32 {{$}}46 47# REL: Symbol table48# REL: {{.*}}: [[V2]] {{.*}} v249 50# REL: Global entries51# REL: {{.*}} -32744(gp) [[V2]] {{.*}} v252