2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-error.s -o %tabs
3 # RUN: llvm-mc %s -o %t.o -triple x86_64-pc-linux -filetype=obj
4 # RUN: not ld.lld %tabs %t.o -o /dev/null -shared 2>&1 | FileCheck %s
6 # RUN: rm -f %t.a && llvm-ar rc %t.a %t.o
7 # RUN: not ld.lld -shared %t.a %tabs -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK2
9 ## Check we are able to report file and location from debug information
10 ## when reporting such kind of errors.
11 # CHECK: error: {{.*}}.o:(.text+0x1): relocation R_X86_64_32 out of range: 68719476736 is not in [0, 4294967295]; references 'big'
12 # CHECK-NEXT: >>> referenced by test.s:3
13 # CHECK-NEXT: >>> defined in {{.*}}abs
15 # CHECK2: error: {{.*}}.a({{.*}}.o):(.text+0x1): relocation R_X86_64_32 out of range: 68719476736 is not in [0, 4294967295]; references 'big'
16 # CHECK2-NEXT: >>> referenced by test.s:3
17 # CHECK2-NEXT: >>> defined in {{.*}}abs
19 .section .text,"ax",@progbits
26 .section .debug_abbrev,"",@progbits
27 .byte 1 # Abbreviation Code
28 .byte 17 # DW_TAG_compile_unit
29 .byte 0 # DW_CHILDREN_no
30 .byte 16 # DW_AT_stmt_list
31 .byte 23 # DW_FORM_sec_offset
36 .section .debug_info,"",@progbits
37 .long .Lend0 - .Lbegin0 # Length of Unit
39 .short 4 # DWARF version number
40 .long .debug_abbrev # Offset Into Abbrev. Section
41 .byte 8 # Address Size (in bytes)
42 .byte 1 # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
43 .long .debug_line # DW_AT_stmt_list
46 .section .debug_line,"",@progbits