brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 9b4c0db Raw
68 lines · plain
1# Test objective to verify warning is printed if DWO secton has relocations.2#3# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o4# RUN: llvm-dwarfdump --debug-info %t.o | FileCheck %s5# RUN: llvm-dwarfdump --debug-info %t.o 2> %t.txt6# RUN: FileCheck --input-file=%t.txt %s --check-prefix=PART2 --implicit-check-not=warning:7 8        .section .debug_str.dwo,"MSe",@progbits,19.dwo_producer:10        .asciz "Handmade DWO producer"11.dwo_CU_5:12        .asciz "V5_dwo_compile_unit"13 14        .section	.debug_str_offsets.dwo,"e",@progbits15        .long	Lstr_offsets_end-Lstr_offsets_start                              # Length of String Offsets Set16        Lstr_offsets_start:17	.short	518	.short	019	.long	.dwo_producer-.debug_str.dwo20	.long	.dwo_CU_5-.debug_str.dwo21        Lstr_offsets_end:22 23# And a .dwo copy for the .dwo sections.24        .section .debug_abbrev.dwo,"e",@progbits25        .byte 0x01  # Abbrev code26        .byte 0x11  # DW_TAG_compile_unit27        .byte 0x00  # DW_CHILDREN_no28        .byte 0x25  # DW_AT_producer29        .byte 0x0e  # DW_FORM_strp30        .byte 0x03  # DW_AT_name31        .byte 0x25  # DW_FORM_strx132        .byte 0x00  # EOM(1)33        .byte 0x00  # EOM(2)34        .byte 0x00  # EOM(3)35 36# PART2: warning: unexpected relocations for dwo section '.debug_abbrev.dwo'37        .reloc ., R_X86_64_NONE, 038 39        .section .debug_info.dwo,"e",@progbits40# CHECK-LABEL: .debug_info.dwo41 42# DWARF v5 split CU header.43        .long  CU_split_5_end-CU_split_5_version # Length of Unit44CU_split_5_version:45        .short 5                # DWARF version number46        .byte 5                 # DWARF Unit Type47        .byte 8                 # Address Size (in bytes)48        .long 0 # Offset Into Abbrev. Section49        .quad 0x5a              # DWO ID50# The split compile-unit DIE, with DW_AT_producer, DW_AT_name, DW_AT_stmt_list.51        .byte 152        .long .dwo_producer53        .byte 154        .byte 0 # NULL55CU_split_5_end:56 57# CHECK: 0x00000000: Compile Unit: length = 0x00000017, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset = 0x0000, addr_size = 0x08, DWO_id = 0x000000000000005a (next unit at 0x0000001b)58# CHECK: 0x00000014: DW_TAG_compile_unit59# CHECK-NEXT: DW_AT_producer	("Handmade DWO producer")60# CHECK-NEXT: DW_AT_name	("V5_dwo_compile_unit")61# PART2: warning: unexpected relocations for dwo section '.debug_info.dwo'62 63## No warning, even if their names end with ".dwo".64        .section .rodata.dwo,"a"65        .long ext66        .section .foo.dwo,""67        .long .dwo_producer68