brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.1 KiB · 141d584 Raw
136 lines · plain
1// RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 5 -fdebug-compilation-dir=/tmp2// RUN: llvm-dwarfdump -v %t | FileCheck --check-prefixes=DWARF,DWARF5 %s3// RUN: llvm-dwarfdump --debug-line %t | FileCheck -check-prefix DWARF-DL -check-prefix DWARF-DL-5 -DDWVER=5 -DDWFILE=0 %s4// RUN: llvm-objdump -r %t | FileCheck --check-prefixes=RELOC,RELOC5 %s5// RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 4 -fdebug-compilation-dir=/tmp6// RUN: llvm-dwarfdump -v %t | FileCheck -check-prefixes=DWARF,DWARF34,DWARF4 %s7// RUN: llvm-dwarfdump --debug-line %t | FileCheck --check-prefixes=DWARF-DL,DWARF-DL-3 -DDWVER=4 -DDWFILE=1 %s8// RUN: llvm-objdump -r %t | FileCheck --check-prefixes=RELOC,RELOC34,RELOC4 %s9// RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 3 -fdebug-compilation-dir=/tmp10// RUN: llvm-dwarfdump -v %t | FileCheck --check-prefixes=DWARF,DWARF34,DWARF3 %s11// RUN: llvm-dwarfdump --debug-line %t | FileCheck --check-prefixes=DWARF-DL,DWARF-DL-3 -DDWVER=3 -DDWFILE=1 %s12// RUN: llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 2 2>&1 | FileCheck -check-prefix VERSION %s13// RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 1 2>&1 | FileCheck -check-prefix DWARF1 %s14// RUN: not llvm-mc < %s -triple=armv7-linux-gnueabi -filetype=obj -o %t -g -dwarf-version 6 2>&1 | FileCheck -check-prefix DWARF6 %s15  .section .text, "ax"16a:17  mov r0, r018 19  .section foo, "ax"20b:21  mov r1, r122 23// Non-executable sections do not contribute address ranges.24  .section .rodata, "a"25c:26  mov r2, r227 28// Non-SHF_ALLOC sections do not contribute address ranges.29  .section nonalloc, "x"30d:31  mov r3, r332 33// DWARF: .debug_abbrev contents:34// DWARF: Abbrev table for offset: 0x0000000035// DWARF: [1] DW_TAG_compile_unit DW_CHILDREN_yes36// DWARF3:        DW_AT_stmt_list DW_FORM_data437// DWARF4:        DW_AT_stmt_list DW_FORM_sec_offset38// DWARF5:        DW_AT_stmt_list DW_FORM_sec_offset39// DWARF3:        DW_AT_ranges    DW_FORM_data440// DWARF4:        DW_AT_ranges    DW_FORM_sec_offset41// DWARF5:        DW_AT_ranges    DW_FORM_sec_offset42// DWARF:         DW_AT_name      DW_FORM_string43// DWARF:         DW_AT_comp_dir  DW_FORM_string44// DWARF:         DW_AT_producer  DW_FORM_string45// DWARF:         DW_AT_language  DW_FORM_data246 47// DWARF: .debug_info contents:48// DWARF: 0x{{[0-9a-f]+}}: DW_TAG_compile_unit [1]49// DWARF-NOT: DW_TAG_50// DWARF3:  DW_AT_ranges [DW_FORM_data4]           (0x0000000051// DWARF4:  DW_AT_ranges [DW_FORM_sec_offset]      (0x0000000052// DWARF5:  DW_AT_ranges [DW_FORM_sec_offset]      (0x0000000c53 54// DWARF: 0x{{[0-9a-f]+}}:   DW_TAG_label [2]55// DWARF-NEXT: DW_AT_name [DW_FORM_string]     ("a")56 57// DWARF: 0x{{[0-9a-f]+}}:   DW_TAG_label [2]58// DWARF-NEXT: DW_AT_name [DW_FORM_string]     ("b")59 60// DWARF-NOT: DW_TAG_label61 62 63// DWARF: .debug_aranges contents:64// DWARF-NEXT: Address Range Header: length = 0x00000024, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x0065// DWARF-NEXT: [0x00000000, 0x00000004)66// DWARF-NEXT: [0x00000000, 0x00000004)67// DWARF-EMPTY:68 69 70// DWARF-DL: .debug_line contents:71// DWARF-DL: version: [[DWVER]]72// DWARF-DL-5:    address_size: 473// DWARF-DL-5:    include_directories[  0] = "/tmp"74// DWARF-DL:      file_names[  [[DWFILE]]]:75// DWARF-DL:      name: "{{(<stdin>|-)}}"76// DWARF-DL-5:      0x0000000000000000     17      0      0   0   0       0  is_stmt77// DWARF-DL-5-NEXT: 0x0000000000000004     17      0      0   0   0       0  is_stmt end_sequence78// DWARF-DL-5-NEXT: 0x0000000000000000     21      0      0   0   0       0  is_stmt79// DWARF-DL-5-NEXT: 0x0000000000000004     21      0      0   0   0       0  is_stmt end_sequence80// DWARF-DL-3:      0x0000000000000000     17      0      1   0   0       0  is_stmt81// DWARF-DL-3-NEXT: 0x0000000000000004     17      0      1   0   0       0  is_stmt end_sequence82// DWARF-DL-3-NEXT: 0x0000000000000000     21      0      1   0   0       0  is_stmt83// DWARF-DL-3-NEXT: 0x0000000000000004     21      0      1   0   0       0  is_stmt end_sequence84// DWARF-DL-EMPTY:85 86 87// DWARF34:      .debug_ranges contents:88// DWARF34-NEXT: 00000000 ffffffff 0000000089// DWARF34-NEXT: 00000000 00000000 0000000490// DWARF34-NEXT: 00000000 ffffffff 0000000091// DWARF34-NEXT: 00000000 00000000 0000000492// DWARF34-NEXT: 00000000 <End of list>93 94// DWARF5:      .debug_rnglists contents:95// DWARF5-NEXT: 0x00000000: range list header: length = 0x00000015, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x0000000096// DWARF5-NEXT: ranges:97// DWARF5-NEXT: 0x0000000c: [DW_RLE_start_length]: 0x00000000, 0x00000004 => [0x00000000, 0x00000004)98// DWARF5-NEXT: 0x00000012: [DW_RLE_start_length]: 0x00000000, 0x00000004 => [0x00000000, 0x00000004)99// DWARF5-NEXT: 0x00000018: [DW_RLE_end_of_list ]100 101 102// Offsets are different in DWARF v5 due to different header layout.103// RELOC: RELOCATION RECORDS FOR [.debug_info]:104// RELOC4-NEXT: OFFSET TYPE VALUE105// RELOC4-NEXT: 00000006 R_ARM_ABS32 .debug_abbrev106// RELOC4-NEXT: 0000000c R_ARM_ABS32 .debug_line107// RELOC4-NEXT: 00000010 R_ARM_ABS32 .debug_ranges108// RELOC5-NEXT: OFFSET TYPE VALUE109// RELOC5-NEXT: 00000008 R_ARM_ABS32 .debug_abbrev110// RELOC5-NEXT: 0000000d R_ARM_ABS32 .debug_line111// RELOC5-NEXT: 00000011 R_ARM_ABS32 .debug_rnglists112// RELOC-NEXT: R_ARM_ABS32 .text113// RELOC-NEXT: R_ARM_ABS32 foo114 115// RELOC: RELOCATION RECORDS FOR [.debug_aranges]:116// RELOC-NEXT: OFFSET TYPE VALUE117// RELOC-NEXT: 00000006 R_ARM_ABS32 .debug_info118// RELOC-NEXT: 00000010 R_ARM_ABS32 .text119// RELOC-NEXT: 00000018 R_ARM_ABS32 foo120 121// RELOC34: RELOCATION RECORDS FOR [.debug_ranges]:122// RELOC34-NEXT: OFFSET TYPE VALUE123// RELOC34-NEXT: 00000004 R_ARM_ABS32 .text124// RELOC34-NEXT: 00000014 R_ARM_ABS32 foo125 126// RELOC5: RELOCATION RECORDS FOR [.debug_rnglists]:127// RELOC5-NEXT: OFFSET TYPE VALUE128// RELOC5-NEXT: 0000000d R_ARM_ABS32 .text129// RELOC5-NEXT: 00000013 R_ARM_ABS32 foo130 131 132// VERSION: {{.*}} warning: DWARF2 only supports one section per compilation unit133 134// DWARF1: Dwarf version 1 is not supported.135// DWARF6: Dwarf version 6 is not supported.136