1 // RUN: llvm-mc -g -triple i686-pc-linux-gnu %s -filetype=obj -o - | elf-dump | FileCheck %s
4 // Test that on ELF the debug info has a relocation to debug_abbrev and one to
16 // Section 4 is .debug_line
18 // CHECK-NEXT: # '.debug_line'
22 // The two relocations, one to symbol 6 and one to 4
23 // CHECK: # '.rel.debug_info'
24 // CHECK-NEXT: ('sh_type',
25 // CHECK-NEXT: ('sh_flags'
26 // CHECK-NEXT: ('sh_addr',
27 // CHECK-NEXT: ('sh_offset',
28 // CHECK-NEXT: ('sh_size',
29 // CHECK-NEXT: ('sh_link',
30 // CHECK-NEXT: ('sh_info',
31 // CHECK-NEXT: ('sh_addralign',
32 // CHECK-NEXT: ('sh_entsize',
33 // CHECK-NEXT: ('_relocations', [
34 // CHECK-NEXT: # Relocation 0
35 // CHECK-NEXT: (('r_offset', 0x00000006)
36 // CHECK-NEXT: ('r_sym', 0x000006)
37 // CHECK-NEXT: ('r_type', 0x01)
39 // CHECK-NEXT: # Relocation 1
40 // CHECK-NEXT: (('r_offset', 0x0000000c)
41 // CHECK-NEXT: ('r_sym', 0x000004)
42 // CHECK-NEXT: ('r_type', 0x01)
46 // Section 8 is .debug_abbrev
48 // CHECK-NEXT: (('sh_name', 0x00000001) # '.debug_abbrev'
50 // Symbol 4 is section 4 (.debug_line)
52 // CHECK-NEXT: (('st_name', 0x00000000) # ''
53 // CHECK-NEXT: ('st_value', 0x00000000)
54 // CHECK-NEXT: ('st_size', 0x00000000)
55 // CHECK-NEXT: ('st_bind', 0x0)
56 // CHECK-NEXT: ('st_type', 0x3)
57 // CHECK-NEXT: ('st_other', 0x00)
58 // CHECK-NEXT: ('st_shndx', 0x0004)
61 // Symbol 6 is section 8 (.debug_abbrev)
63 // CHECK-NEXT: (('st_name', 0x00000000) # ''
64 // CHECK-NEXT: ('st_value', 0x00000000)
65 // CHECK-NEXT: ('st_size', 0x00000000)
66 // CHECK-NEXT: ('st_bind', 0x0)
67 // CHECK-NEXT: ('st_type', 0x3)
68 // CHECK-NEXT: ('st_other', 0x00)
69 // CHECK-NEXT: ('st_shndx', 0x0008)