1 ## This tests handling invalid .debug_str_offsets.dwo sections in
2 ## a pre-standard DWO/DWP file.
4 # RUN: llvm-mc -triple x86_64 %s -filetype=obj -o %t.dwo
5 # RUN: not llvm-dwarfdump -v %t.dwo 2>&1 | FileCheck %s
7 # RUN: llvm-mc -triple x86_64 %s -filetype=obj -o %t.dwp --defsym DWP=0
8 # RUN: not llvm-dwarfdump -v %t.dwp 2>&1 | FileCheck %s
10 # CHECK: error: invalid reference to or invalid content in .debug_str_offsets[.dwo]: length exceeds section size
12 .section .debug_abbrev.dwo,"e",@progbits
14 .byte 0x01 # Abbrev code
15 .byte 0x11 # DW_TAG_compile_unit
16 .byte 0x00 # DW_CHILDREN_no
22 .section .debug_info.dwo,"e",@progbits
24 .long .LCUEnd-.LCUVersion
32 ## The section is truncated, i.e. its size is not a multiple of entry size.
33 .section .debug_str_offsets.dwo,"e",@progbits
39 .section .debug_cu_index, "", @progbits
42 .long 3 # Section count
45 ## Hash Table of Signatures:
46 .quad 0x1100001122222222 # DWO Id of CU0
48 ## Parallel Table of Indexes:
51 ## Table of Section Offsets:
53 .long 1 # DW_SECT_INFO
54 .long 3 # DW_SECT_ABBREV
55 .long 6 # DW_SECT_STR_OFFSETS
56 ## Row 1, offsets of the contribution
57 .long .LCU-.debug_info.dwo
58 .long .LAbbr-.debug_abbrev.dwo
59 .long .LStrOff-.debug_str_offsets.dwo
60 ## Table of Section Sizes:
61 ## Row 1, sizes of the contribution
63 .long .LAbbrEnd-.LAbbr
64 .long .LStrOffEnd-.LStrOff