2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=x86_64 %S/Inputs/abs255.s -o %t255.o
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 %S/Inputs/abs256.s -o %t256.o
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 %S/Inputs/abs257.s -o %t257.o
7 # RUN: ld.lld %t.o %t256.o -o %t
8 # RUN: llvm-readelf -x .data %t | FileCheck %s
9 # CHECK: 0x{{[0-9a-f]+}} ff80ffff 0080
11 # RUN: not ld.lld %t.o %t255.o -o /dev/null 2>&1 | FileCheck --check-prefix=OVERFLOW1 %s
12 # 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]
15 # RUN: not ld.lld %t.o %t257.o -o /dev/null 2>&1 | FileCheck --check-prefix=OVERFLOW2 %s
16 # 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]