32 lines · plain
1# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \2# RUN: -filetype=obj -o %t.o %s3# RUN: llvm-jitlink -noexec -abs X=0x12345678 -check=%s %t.o4# RUN: not llvm-jitlink -noexec -abs X=0x123456789 %t.o 2>&1 | \5# RUN: FileCheck -check-prefix=CHECK-ERROR %s6#7# Check success and failure cases of R_X86_64_32 handling.8 9# jitlink-check: *{8}P = X10 11# CHECK-ERROR: relocation target {{.*}} (X) is out of range of Pointer32 fixup12 13 .text14 .section .text.main,"ax",@progbits15 .globl main16 .p2align 4, 0x9017 .type main,@function18main:19 xorl %eax, %eax20 retq21.Lfunc_end0:22 .size main, .Lfunc_end0-main23 24 .type P,@object25 .data26 .globl P27 .p2align 2, 0x028P:29 .long X # Using long here generates R_X86_64_32.30 .long 031 .size P, 832