• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -fdebug-compilation-dir=/tmp -dwarf-version 2 2>&1 | FileCheck -check-prefix MESSAGES %s
2// RUN: llvm-dwarfdump -a %t | FileCheck -check-prefix DWARF %s
3// RUN: llvm-objdump -r %t | FileCheck --check-prefix=RELOC %s
4
5  .section .text, "ax"
6a:
7  mov r0, r0
8
9  .section foo, "ax"
10b:
11  mov r1, r1
12
13// MESSAGES: warning: DWARF2 only supports one section per compilation unit
14
15// DWARF: .debug_abbrev contents:
16// DWARF: Abbrev table for offset: 0x00000000
17// DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes
18// DWARF:         DW_AT_stmt_list DW_FORM_data4
19// DWARF:         DW_AT_low_pc    DW_FORM_addr
20// DWARF:         DW_AT_high_pc   DW_FORM_addr
21// DWARF:         DW_AT_name      DW_FORM_string
22// DWARF:         DW_AT_comp_dir  DW_FORM_string
23// DWARF:         DW_AT_producer  DW_FORM_string
24// DWARF:         DW_AT_language  DW_FORM_data2
25
26// DWARF: .debug_info contents:
27// DWARF: DW_TAG_compile_unit
28// DWARF-NOT: DW_TAG_
29// DWARF:               DW_AT_low_pc {{.*}}(0x00000000)
30// DWARF:               DW_AT_high_pc {{.*}}(0x00000004)
31
32// DWARF: DW_TAG_label
33// DWARF-NEXT: DW_AT_name {{.*}}("a")
34
35
36// DWARF: .debug_aranges contents:
37// DWARF-NEXT: Address Range Header: length = 0x00000024, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00
38// DWARF-NEXT: [0x00000000, 0x00000004)
39// DWARF-NEXT: [0x00000000, 0x00000004)
40
41// DWARF: .debug_line contents:
42// DWARF:      0x0000000000000000      7      0      1   0   0 is_stmt
43// DWARF-NEXT: 0x0000000000000004      7      0      1   0   0 is_stmt end_sequence
44// DWARF:      0x0000000000000000     11      0      1   0   0 is_stmt
45// DWARF-NEXT: 0x0000000000000004     11      0      1   0   0 is_stmt end_sequence
46
47
48// DWARF-NOT: .debug_ranges contents:
49// DWARF-NOT: .debug_pubnames contents:
50
51
52// RELOC: RELOCATION RECORDS FOR [.debug_info]:
53// RELOC-NEXT: OFFSET TYPE VALUE
54// RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_abbrev
55// RELOC-NEXT: 0000000c R_ARM_ABS32 .debug_line
56// RELOC-NEXT: R_ARM_ABS32 .text
57// RELOC-NEXT: R_ARM_ABS32 .text
58// RELOC-NEXT: R_ARM_ABS32 .text
59// RELOC-NEXT: R_ARM_ABS32 foo
60
61// RELOC-NOT: RELOCATION RECORDS FOR [.debug_ranges]:
62
63// RELOC: RELOCATION RECORDS FOR [.debug_aranges]:
64// RELOC-NEXT: OFFSET TYPE VALUE
65// RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_info
66// RELOC-NEXT: 00000010 R_ARM_ABS32 .text
67// RELOC-NEXT: 00000018 R_ARM_ABS32 foo
68