26 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3# RUN: llvm-mc -filetype=obj -triple=x86_64 %S/Inputs/abs255.s -o %t255.o4# RUN: llvm-mc -filetype=obj -triple=x86_64 %S/Inputs/abs256.s -o %t256.o5# RUN: llvm-mc -filetype=obj -triple=x86_64 %S/Inputs/abs257.s -o %t257.o6 7# RUN: ld.lld %t.o %t256.o -o %t8# RUN: llvm-readelf -x .data %t | FileCheck %s9# CHECK: 0x{{[0-9a-f]+}} ff80ffff 008010 11# RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck --check-prefix=OVERFLOW1 %s12# OVERFLOW1: relocation R_X86_64_8 out of range: -129 is not in [-128, 255]13# OVERFLOW1: relocation R_X86_64_16 out of range: -32769 is not in [-32768, 65535]14 15# RUN: not ld.lld %t.o %t257.o -o /dev/null 2>&1 | FileCheck --check-prefix=OVERFLOW2 %s16# OVERFLOW2: relocation R_X86_64_8 out of range: 256 is not in [-128, 255]17# OVERFLOW2: relocation R_X86_64_16 out of range: 65536 is not in [-32768, 65535]18 19.globl _start20_start:21.data22.byte foo - 123.byte foo - 38424.word foo + 0xfeff25.word foo - 0x810026