blob: 3eb3797f443f35cb865c67ef0748387f5b776793 [file] [log] [blame]
Rafael Espindola64185cc2010-11-13 01:06:27 +00001// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
2
3// Test that we don't regress on the size of the line info section. We used
4// to handle negative line diffs incorrectly which manifested as very
5// large integers being passed to DW_LNS_advance_line.
6
7// FIXME: This size is the same as gnu as, but we can probably do a bit better.
8// FIXME2: We need a debug_line dumper so that we can test the actual contents.
9
Rafael Espindola014180d2011-08-04 13:39:15 +000010// CHECK: # Section 4
Rafael Espindola9974b8b2011-04-07 23:51:25 +000011// CHECK-NEXT: (('sh_name', 0x00000011) # '.debug_line'
Rafael Espindola64185cc2010-11-13 01:06:27 +000012// CHECK-NEXT: ('sh_type', 0x00000001)
Rafael Espindola5c4e52e2011-08-04 17:00:11 +000013// CHECK-NEXT: ('sh_flags', 0x0000000000000000)
14// CHECK-NEXT: ('sh_addr', 0x0000000000000000)
15// CHECK-NEXT: ('sh_offset', 0x0000000000000044)
16// CHECK-NEXT: ('sh_size', 0x000000000000003d)
Rafael Espindola64185cc2010-11-13 01:06:27 +000017// CHECK-NEXT: ('sh_link', 0x00000000)
18// CHECK-NEXT: ('sh_info', 0x00000000)
Rafael Espindola5c4e52e2011-08-04 17:00:11 +000019// CHECK-NEXT: ('sh_addralign', 0x0000000000000001)
20// CHECK-NEXT: ('sh_entsize', 0x0000000000000000)
Rafael Espindola64185cc2010-11-13 01:06:27 +000021// CHECK-NEXT: ),
22
23 .section .debug_line,"",@progbits
24 .text
25foo:
26 .file 1 "Driver.ii"
27 .loc 1 2 0
28 nop
29 .loc 1 4 0
30 nop
31 .loc 1 3 0
32 nop