Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / x86-64-reloc-range-debug-loc.s
blob0059de975f3ccd4293b9c9c2369e3a9c19906a5a
1 # REQUIRES: x86
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
20 .globl _start
21 _start:
22 .file 1 "test.s"
23 .loc 1 3
24 movl $big, %edx
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
32 .byte 0 # EOM(1)
33 .byte 0 # EOM(2)
34 .byte 0 # EOM(3)
36 .section .debug_info,"",@progbits
37 .long .Lend0 - .Lbegin0 # Length of Unit
38 .Lbegin0:
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
44 .Lend0:
46 .section .debug_line,"",@progbits