1 // RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s
5 // 1. the debug info has a relocation to debug_abbrev and one to to debug_line.
6 // 2. the debug_aranges has relocations to text and debug_line.
17 // Section 4 is .debug_line
19 // CHECK-NEXT: # '.debug_line'
23 // The two relocations, one to symbol 6 and one to 4
24 // CHECK: # '.rel.debug_info'
25 // CHECK-NEXT: ('sh_type',
26 // CHECK-NEXT: ('sh_flags'
27 // CHECK-NEXT: ('sh_addr',
28 // CHECK-NEXT: ('sh_offset',
29 // CHECK-NEXT: ('sh_size',
30 // CHECK-NEXT: ('sh_link',
31 // CHECK-NEXT: ('sh_info',
32 // CHECK-NEXT: ('sh_addralign',
33 // CHECK-NEXT: ('sh_entsize',
34 // CHECK-NEXT: ('_relocations', [
35 // CHECK-NEXT: # Relocation 0
36 // CHECK-NEXT: (('r_offset', 0x00000006)
37 // CHECK-NEXT: ('r_sym', 0x000006)
38 // CHECK-NEXT: ('r_type', 0x01)
40 // CHECK-NEXT: # Relocation 1
41 // CHECK-NEXT: (('r_offset', 0x0000000c)
42 // CHECK-NEXT: ('r_sym', 0x000004)
43 // CHECK-NEXT: ('r_type', 0x01)
47 // Section 8 is .debug_abbrev
49 // CHECK-NEXT: (('sh_name', 0x00000001) # '.debug_abbrev'
51 // Section 9 is .debug_aranges
53 // CHECK-NEXT: (('sh_name', 0x0000001e) # '.debug_aranges'
55 // Two relocations in .debug_aranges, one to text and one to debug_info.
56 // CHECK: # '.rel.debug_aranges'
57 // CHECK: # Relocation 0
58 // CHECK-NEXT: (('r_offset', 0x00000006)
59 // CHECK-NEXT: ('r_sym', 0x000005)
60 // CHECK-NEXT: ('r_type', 0x01)
62 // CHECK-NEXT: # Relocation 1
63 // CHECK-NEXT: (('r_offset', 0x00000010)
64 // CHECK-NEXT: ('r_sym', 0x000001)
65 // CHECK-NEXT: ('r_type', 0x01)
68 // Symbol 1 is section 1 (.text)
70 // CHECK-NEXT: (('st_name', 0x00000000) # ''
71 // CHECK-NEXT: ('st_value', 0x00000000)
72 // CHECK-NEXT: ('st_size', 0x00000000)
73 // CHECK-NEXT: ('st_bind', 0x0)
74 // CHECK-NEXT: ('st_type', 0x3)
75 // CHECK-NEXT: ('st_other', 0x00)
76 // CHECK-NEXT: ('st_shndx', 0x0001)
79 // Symbol 4 is section 4 (.debug_line)
81 // CHECK-NEXT: (('st_name', 0x00000000) # ''
82 // CHECK-NEXT: ('st_value', 0x00000000)
83 // CHECK-NEXT: ('st_size', 0x00000000)
84 // CHECK-NEXT: ('st_bind', 0x0)
85 // CHECK-NEXT: ('st_type', 0x3)
86 // CHECK-NEXT: ('st_other', 0x00)
87 // CHECK-NEXT: ('st_shndx', 0x0004)
90 // Symbol 5 is section 6 (.debug_info)
92 // CHECK-NEXT: (('st_name', 0x00000000) # ''
93 // CHECK-NEXT: ('st_value', 0x00000000)
94 // CHECK-NEXT: ('st_size', 0x00000000)
95 // CHECK-NEXT: ('st_bind', 0x0)
96 // CHECK-NEXT: ('st_type', 0x3)
97 // CHECK-NEXT: ('st_other', 0x00)
98 // CHECK-NEXT: ('st_shndx', 0x0006)
101 // Symbol 6 is section 8 (.debug_abbrev)
103 // CHECK-NEXT: (('st_name', 0x00000000) # ''
104 // CHECK-NEXT: ('st_value', 0x00000000)
105 // CHECK-NEXT: ('st_size', 0x00000000)
106 // CHECK-NEXT: ('st_bind', 0x0)
107 // CHECK-NEXT: ('st_type', 0x3)
108 // CHECK-NEXT: ('st_other', 0x00)
109 // CHECK-NEXT: ('st_shndx', 0x0008)