[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / DebugInfo / X86 / dwarfdump-str-offsets-invalid-6.s
blob03d70347a2f22f956d43da24dd9404615008c4aa
1 # RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o
2 # RUN: llvm-dwarfdump -v %t.o 2>&1 | FileCheck --check-prefix=OVERLAP %s
4 # Test object to verify that llvm-dwarfdump handles an invalid string offsets
5 # table with overlapping contributions.
7 .section .debug_str,"MS",@progbits,1
8 str_producer:
9 .asciz "Handmade DWARF producer"
10 str_CU1:
11 .asciz "Compile_Unit_1"
12 str_CU1_dir:
13 .asciz "/home/test/CU1"
14 str_CU2:
15 .asciz "Compile_Unit_2"
16 str_CU2_dir:
17 .asciz "/home/test/CU2"
18 str_TU:
19 .asciz "Type_Unit"
20 str_TU_type:
21 .asciz "MyStruct"
23 .section .debug_str.dwo,"MS",@progbits,1
24 dwo_str_CU_5_producer:
25 .asciz "Handmade split DWARF producer"
26 dwo_str_CU_5_name:
27 .asciz "V5_split_compile_unit"
28 dwo_str_CU_5_comp_dir:
29 .asciz "/home/test/splitCU"
30 dwo_str_TU_5:
31 .asciz "V5_split_type_unit"
32 dwo_str_TU_5_type:
33 .asciz "V5_split_Mystruct"
35 # A rudimentary abbrev section.
36 .section .debug_abbrev,"",@progbits
37 .byte 0x01 # Abbrev code
38 .byte 0x11 # DW_TAG_compile_unit
39 .byte 0x00 # DW_CHILDREN_no
40 .byte 0x72 # DW_AT_str_offsets_base
41 .byte 0x17 # DW_FORM_sec_offset
42 .byte 0x00 # EOM(1)
43 .byte 0x00 # EOM(2)
44 .byte 0x00 # EOM(3)
46 .section .debug_info,"",@progbits
47 # DWARF v5 CU header.
48 .long CU1_5_end-CU1_5_version # Length of Unit
49 CU1_5_version:
50 .short 5 # DWARF version number
51 .byte 1 # DWARF Unit Type
52 .byte 8 # Address Size (in bytes)
53 .long .debug_abbrev # Offset Into Abbrev. Section
54 # A compile-unit DIE, which has no attributes.
55 .byte 1 # Abbreviation code
56 .long .debug_str_offsets_base0
57 CU1_5_end:
59 # DWARF v5 CU header.
60 .long CU2_5_end-CU2_5_version # Length of Unit
61 CU2_5_version:
62 .short 5 # DWARF version number
63 .byte 1 # DWARF Unit Type
64 .byte 8 # Address Size (in bytes)
65 .long .debug_abbrev # Offset Into Abbrev. Section
66 # A compile-unit DIE, which has no attributes.
67 .byte 1 # Abbreviation code
68 .long .debug_str_offsets_base1
69 CU2_5_end:
71 .section .debug_str_offsets,"",@progbits
72 # CU1's contribution
73 .long .debug_str_offsets_segment1_end-.debug_str_offsets_base0+4
74 .short 5 # DWARF version
75 .short 0 # Padding
76 .debug_str_offsets_base0:
77 .long str_producer
78 .long str_CU1
79 .long str_CU1_dir
80 .debug_str_offsets_segment0_end:
81 # CU2's contribution
82 # Overlapping with CU1's contribution
83 .long .debug_str_offsets_segment1_end-.debug_str_offsets_base1+4
84 .short 5 # DWARF version
85 .short 0 # Padding
86 .debug_str_offsets_base1:
87 .long str_producer
88 .long str_CU2
89 .long str_CU2_dir
90 .debug_str_offsets_segment1_end:
92 # OVERLAP: error: overlapping contributions to string offsets table in section .debug_str_offsets.