1# clang++ -g2 -gdwarf-5 helper.cpp -S 2# __attribute__ ((used)) 3# static struct { 4# int i; 5# } Foo; 6 7# Manually modified to remove DW_AT_addr_base and DW_AT_location. 8 9 .text 10 .file "helper.cpp" 11 .file 0 "." "helper.cpp" md5 0x18c63f39ce5af555b264ad09798e35d5 12 .type _ZL3Foo,@object # @_ZL3Foo 13 .local _ZL3Foo 14 .comm _ZL3Foo,4,4 15 .section .debug_abbrev,"",@progbits 16 .byte 1 # Abbreviation Code 17 .byte 17 # DW_TAG_compile_unit 18 .byte 1 # DW_CHILDREN_yes 19 .byte 37 # DW_AT_producer 20 .byte 37 # DW_FORM_strx1 21 .byte 19 # DW_AT_language 22 .byte 5 # DW_FORM_data2 23 .byte 3 # DW_AT_name 24 .byte 37 # DW_FORM_strx1 25 .byte 114 # DW_AT_str_offsets_base 26 .byte 23 # DW_FORM_sec_offset 27 .byte 16 # DW_AT_stmt_list 28 .byte 23 # DW_FORM_sec_offset 29 .byte 27 # DW_AT_comp_dir 30 .byte 37 # DW_FORM_strx1 31 #.byte 115 # DW_AT_addr_base manually removed 32 #.byte 23 # DW_FORM_sec_offset 33 .byte 0 # EOM(1) 34 .byte 0 # EOM(2) 35 .byte 2 # Abbreviation Code 36 .byte 52 # DW_TAG_variable 37 .byte 0 # DW_CHILDREN_no 38 .byte 3 # DW_AT_name 39 .byte 37 # DW_FORM_strx1 40 .byte 73 # DW_AT_type 41 .byte 19 # DW_FORM_ref4 42 .byte 58 # DW_AT_decl_file 43 .byte 11 # DW_FORM_data1 44 .byte 59 # DW_AT_decl_line 45 .byte 11 # DW_FORM_data1 46 #.byte 2 # DW_AT_location manually removed 47 #.byte 24 # DW_FORM_exprloc 48 .byte 110 # DW_AT_linkage_name 49 .byte 37 # DW_FORM_strx1 50 .byte 0 # EOM(1) 51 .byte 0 # EOM(2) 52 .byte 3 # Abbreviation Code 53 .byte 19 # DW_TAG_structure_type 54 .byte 1 # DW_CHILDREN_yes 55 .byte 54 # DW_AT_calling_convention 56 .byte 11 # DW_FORM_data1 57 .byte 11 # DW_AT_byte_size 58 .byte 11 # DW_FORM_data1 59 .byte 58 # DW_AT_decl_file 60 .byte 11 # DW_FORM_data1 61 .byte 59 # DW_AT_decl_line 62 .byte 11 # DW_FORM_data1 63 .byte 0 # EOM(1) 64 .byte 0 # EOM(2) 65 .byte 4 # Abbreviation Code 66 .byte 13 # DW_TAG_member 67 .byte 0 # DW_CHILDREN_no 68 .byte 3 # DW_AT_name 69 .byte 37 # DW_FORM_strx1 70 .byte 73 # DW_AT_type 71 .byte 19 # DW_FORM_ref4 72 .byte 58 # DW_AT_decl_file 73 .byte 11 # DW_FORM_data1 74 .byte 59 # DW_AT_decl_line 75 .byte 11 # DW_FORM_data1 76 .byte 56 # DW_AT_data_member_location 77 .byte 11 # DW_FORM_data1 78 .byte 0 # EOM(1) 79 .byte 0 # EOM(2) 80 .byte 5 # Abbreviation Code 81 .byte 36 # DW_TAG_base_type 82 .byte 0 # DW_CHILDREN_no 83 .byte 3 # DW_AT_name 84 .byte 37 # DW_FORM_strx1 85 .byte 62 # DW_AT_encoding 86 .byte 11 # DW_FORM_data1 87 .byte 11 # DW_AT_byte_size 88 .byte 11 # DW_FORM_data1 89 .byte 0 # EOM(1) 90 .byte 0 # EOM(2) 91 .byte 0 # EOM(3) 92 .section .debug_info,"",@progbits 93.Lcu_begin0: 94 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 95.Ldebug_info_start0: 96 .short 5 # DWARF version number 97 .byte 1 # DWARF Unit Type 98 .byte 8 # Address Size (in bytes) 99 .long .debug_abbrev # Offset Into Abbrev. Section 100 .byte 1 # Abbrev [1] 0xc:0x32 DW_TAG_compile_unit 101 .byte 0 # DW_AT_producer 102 .short 33 # DW_AT_language 103 .byte 1 # DW_AT_name 104 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base 105 .long .Lline_table_start0 # DW_AT_stmt_list 106 .byte 2 # DW_AT_comp_dir 107 #.long .Laddr_table_base0 # DW_AT_addr_base manually removed 108 .byte 2 # Abbrev [2] 0x1e:0xc DW_TAG_variable 109 .byte 3 # DW_AT_name 110 .long 35 # DW_AT_type 111 .byte 0 # DW_AT_decl_file 112 .byte 4 # DW_AT_decl_line 113 #.byte 2 # DW_AT_location manually removed 114 #.byte 161 115 #.byte 0 116 .byte 6 # DW_AT_linkage_name 117 .byte 3 # Abbrev [3] 0x2a:0xf DW_TAG_structure_type 118 .byte 5 # DW_AT_calling_convention 119 .byte 4 # DW_AT_byte_size 120 .byte 0 # DW_AT_decl_file 121 .byte 2 # DW_AT_decl_line 122 .byte 4 # Abbrev [4] 0x2f:0x9 DW_TAG_member 123 .byte 4 # DW_AT_name 124 .long 50 # DW_AT_type 125 .byte 0 # DW_AT_decl_file 126 .byte 3 # DW_AT_decl_line 127 .byte 0 # DW_AT_data_member_location 128 .byte 0 # End Of Children Mark 129 .byte 5 # Abbrev [5] 0x39:0x4 DW_TAG_base_type 130 .byte 5 # DW_AT_name 131 .byte 5 # DW_AT_encoding 132 .byte 4 # DW_AT_byte_size 133 .byte 0 # End Of Children Mark 134.Ldebug_info_end0: 135 .section .debug_str_offsets,"",@progbits 136 .long 32 # Length of String Offsets Set 137 .short 5 138 .short 0 139.Lstr_offsets_base0: 140 .section .debug_str,"MS",@progbits,1 141.Linfo_string0: 142 .asciz "clang version 16.0.0" # string offset=0 143.Linfo_string1: 144 .asciz "helper.cpp" # string offset=134 145.Linfo_string2: 146 .asciz "." # string offset=145 147.Linfo_string3: 148 .asciz "Foo" # string offset=183 149.Linfo_string4: 150 .asciz "i" # string offset=187 151.Linfo_string5: 152 .asciz "int" # string offset=189 153.Linfo_string6: 154 .asciz "_ZL3Foo" # string offset=193 155 .section .debug_str_offsets,"",@progbits 156 .long .Linfo_string0 157 .long .Linfo_string1 158 .long .Linfo_string2 159 .long .Linfo_string3 160 .long .Linfo_string4 161 .long .Linfo_string5 162 .long .Linfo_string6 163 .section .debug_addr,"",@progbits 164 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 165.Ldebug_addr_start0: 166 .short 5 # DWARF version number 167 .byte 8 # Address size 168 .byte 0 # Segment selector size 169.Laddr_table_base0: 170 .quad _ZL3Foo 171.Ldebug_addr_end0: 172 .ident "clang version 16.0.0" 173 .section ".note.GNU-stack","",@progbits 174 .addrsig 175 .addrsig_sym _ZL3Foo 176 .section .debug_line,"",@progbits 177.Lline_table_start0: 178