150
|
1 # REQUIRES: x86
|
|
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
|
|
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/multiple-cu.s -o %t2.o
|
|
4 # RUN: ld.lld -r -o %t.o %t1.o %t2.o
|
|
5 # RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
|
|
6
|
|
7 # CHECK: error: undefined symbol: foo
|
|
8 # CHECK-NEXT: referenced by test1.c:2
|
|
9
|
|
10 # CHECK: error: undefined symbol: bar
|
|
11 # CHECK-NEXT: referenced by test2.c:2
|
|
12
|
|
13 .globl _start
|
|
14 _start:
|
|
15 .file 1 "test1.c"
|
|
16 .loc 1 2 0
|
|
17 jmp foo
|
|
18
|
|
19 .section .debug_abbrev,"",@progbits
|
|
20 .byte 1 # Abbreviation Code
|
|
21 .byte 17 # DW_TAG_compile_unit
|
|
22 .byte 0 # DW_CHILDREN_no
|
|
23 .byte 16 # DW_AT_stmt_list
|
|
24 .byte 23 # DW_FORM_sec_offset
|
|
25 .byte 0 # EOM(1)
|
|
26 .byte 0 # EOM(2)
|
|
27 .byte 0 # EOM(3)
|
|
28
|
|
29 .section .debug_info,"",@progbits
|
|
30 .long .Lend0 - .Lbegin0 # Length of Unit
|
|
31 .Lbegin0:
|
|
32 .short 4 # DWARF version number
|
|
33 .long .debug_abbrev # Offset Into Abbrev. Section
|
|
34 .byte 8 # Address Size (in bytes)
|
|
35 .byte 1 # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
|
|
36 .long .debug_line # DW_AT_stmt_list
|
|
37 .Lend0:
|
|
38 .section .debug_line,"",@progbits
|