34 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=0x1234 -check=%s %t.o4# RUN: not llvm-jitlink -noexec -abs X=0x12345 %t.o 2>&1 | \5# RUN: FileCheck -check-prefix=CHECK-ERROR %s6#7# Check success and failure cases of R_X86_64_16 handling.8 9# jitlink-check: *{8}P = X10 11# CHECK-ERROR: relocation target {{.*}} (X) is out of range of Pointer16 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 1, 0x028P:29 .short X # Using short here generates R_X86_64_16.30 .short 031 .short 032 .short 033 .size P, 834