69 lines · plain
1# REQUIRES: system-linux2# RUN: rm -rf %t && mkdir -p %t3# RUN: llvm-mc -triple=systemz-unknown-linux -position-independent \4# RUN: -filetype=obj -o %t/elf_reloc.o %s5#6# RUN: llvm-jitlink -noexec \7# RUN: -slab-allocate 100Kb -slab-address 0x6ff00000 -slab-page-size 4096 \8# RUN: -abs foo=0x6ff04080 \9# RUN: -abs bar=0x6ff04040 \10# RUN: %t/elf_reloc.o -check %s11 12 .text13 .globl main14 .type main,@function15main:16 br %r1417 .size main, .-main18 19 .data20 .globl test_gotoff16_bar21# jitlink-check: *{2}test_gotoff16_bar = (bar - _GLOBAL_OFFSET_TABLE_) & 0xffff22test_gotoff16_bar:23 .reloc ., R_390_GOTOFF16, bar24 .space 225 .size test_gotoff16_bar, .-test_gotoff16_bar26 27 .globl test_pltoff16_foo28# jitlink-check: *{2}test_pltoff16_foo = \29# jitlink-check: (stub_addr(elf_reloc.o, foo) - _GLOBAL_OFFSET_TABLE_) \30# jitlink-check: & 0xffff31test_pltoff16_foo:32 .reloc ., R_390_PLTOFF16, foo 33 .space 234 .size test_pltoff16_foo, .-test_pltoff16_foo35 36 37 .globl test_gotoff32_bar38# jitlink-check: *{4}test_gotoff32_bar = (bar - _GLOBAL_OFFSET_TABLE_) \39# jitlink-check: & 0xffffffff40test_gotoff32_bar:41 .reloc ., R_390_GOTOFF, bar42 .space 4 43 .size test_gotoff32_bar, .-test_gotoff32_bar44 45 .globl test_pltoff32_foo46# jitlink-check: *{4}test_pltoff32_foo = \47# jitlink-check: (stub_addr(elf_reloc.o, foo) - _GLOBAL_OFFSET_TABLE_) \48# jitlink-check: & 0xffffffff49test_pltoff32_foo:50 .reloc ., R_390_PLTOFF32, foo51 .space 4 52 .size test_pltoff32_foo, .-test_pltoff32_foo53 54 .globl test_gotoff64_bar55# jitlink-check: *{8}test_gotoff64_bar = bar - _GLOBAL_OFFSET_TABLE_56test_gotoff64_bar:57 .reloc ., R_390_GOTOFF64, bar58 .space 8 59 .size test_gotoff64_bar, .-test_gotoff64_bar60 61 .globl test_pltoff64_foo62# jitlink-check: *{8}test_pltoff64_foo = \63# jitlink-check: (stub_addr(elf_reloc.o, foo) - _GLOBAL_OFFSET_TABLE_)64test_pltoff64_foo:65 .reloc ., R_390_PLTOFF64, foo66 .space 8 67 .size test_pltoff64_foo, .-test_pltoff64_foo68 69