38 lines · plain
1# REQUIRES: x862 3# RUN: rm -rf %t; split-file %s %t4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/bar.s -o %t/bar.o6# RUN: %lld -dylib %t/bar.o -o %t/libbar.dylib7# RUN: not %lld -lSystem -o /dev/null %t/libbar.dylib %t/test.o 2>&1 | FileCheck %s8 9# CHECK-DAG: error: {{.*}}test.o:(symbol _main+0xd): relocation UNSIGNED is out of range: [[#]] is not in [0, 4294967295]; references _foo10# CHECK-DAG: error: {{.*}}test.o:(symbol _main+0x3): relocation GOT_LOAD is out of range: [[#]] is not in [-2147483648, 2147483647]; references _foo11# CHECK-DAG: error: stub is out of range: [[#]] is not in [-2147483648, 2147483647]; references _bar12# CHECK-DAG: error: stub helper header is out of range: [[#]] is not in [-2147483648, 2147483647]13# CHECK-DAG: error: stub helper header is out of range: [[#]] is not in [-2147483648, 2147483647]14 15#--- bar.s16.globl _bar17_bar:18 19#--- test.s20 21# Added to ensure that the error mentions the right function.22_baz:23 ret24 25.globl _main, _foo26 27_main:28 movq _foo@GOTPCREL(%rip), %rax29 callq _bar30 ret31 32.int _foo33.zerofill __TEXT,bss,_zero,0xffffffff34 35.data36_foo:37 .space 038