11#--- main.s
2- # clang++ -g2 -gdwarf-4 -gsplit-dwarf=split -S main.cpp
2+ # clang++ -g2 -gdwarf-4 -gsplit-dwarf=split -gno-pubnames - S main.cpp
33# extern int getReturn();
44# int main() {
55# return getReturn();
@@ -24,8 +24,6 @@ main: # @main
2424 .byte 23 # DW_FORM_sec_offset
2525 .byte 27 # DW_AT_comp_dir
2626 .byte 14 # DW_FORM_strp
27- .ascii "\264B" # DW_AT_GNU_pubnames
28- .byte 25 # DW_FORM_flag_present
2927 .ascii "\260B" # DW_AT_GNU_dwo_name
3028 .byte 14 # DW_FORM_strp
3129 .ascii "\261B" # DW_AT_GNU_dwo_id
@@ -49,7 +47,6 @@ main: # @main
4947 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
5048 .long .Lline_table_start0 # DW_AT_stmt_list
5149 .long .Lskel_string0 # DW_AT_comp_dir
52- # DW_AT_GNU_pubnames
5350 .long .Lskel_string1 # DW_AT_GNU_dwo_name
5451 .quad -9094791692727444213 # DW_AT_GNU_dwo_id
5552 .quad .Lfunc_begin0 # DW_AT_low_pc
@@ -158,36 +155,14 @@ main: # @main
158155 .section .debug_addr,"",@progbits
159156.Laddr_table_base0:
160157 .quad .Lfunc_begin0
161- .section .debug_gnu_pubnames,"",@progbits
162- .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
163- .LpubNames_start0:
164- .short 2 # DWARF Version
165- .long .Lcu_begin0 # Offset of Compilation Unit Info
166- .long 48 # Compilation Unit Length
167- .long 25 # DIE offset
168- .byte 48 # Attributes: FUNCTION, EXTERNAL
169- .asciz "main" # External Name
170- .long 0 # End Mark
171- .LpubNames_end0:
172- .section .debug_gnu_pubtypes,"",@progbits
173- .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
174- .LpubTypes_start0:
175- .short 2 # DWARF Version
176- .long .Lcu_begin0 # Offset of Compilation Unit Info
177- .long 48 # Compilation Unit Length
178- .long 40 # DIE offset
179- .byte 144 # Attributes: TYPE, STATIC
180- .asciz "int" # External Name
181- .long 0 # End Mark
182- .LpubTypes_end0:
183158 .ident "clang version 22.0.0"
184159 .section ".note.GNU-stack" ,"",@progbits
185160 .addrsig
186161 .addrsig_sym _Z9getReturnv
187162 .section .debug_line,"",@progbits
188163.Lline_table_start0:
189164#--- helper.s
190- # clang++ -g2 -gdwarf-4 -gsplit-dwarf=split -S helper.cpp
165+ # clang++ -g2 -gdwarf-4 -gsplit-dwarf=split -gno-pubnames - S helper.cpp
191166# int getReturn() {
192167# return 0;
193168# }
@@ -211,8 +186,6 @@ _Z9getReturnv: # @_Z9getReturnv
211186 .byte 23 # DW_FORM_sec_offset
212187 .byte 27 # DW_AT_comp_dir
213188 .byte 14 # DW_FORM_strp
214- .ascii "\264B" # DW_AT_GNU_pubnames
215- .byte 25 # DW_FORM_flag_present
216189 .ascii "\260B" # DW_AT_GNU_dwo_name
217190 .byte 14 # DW_FORM_strp
218191 .ascii "\261B" # DW_AT_GNU_dwo_id
@@ -236,7 +209,6 @@ _Z9getReturnv: # @_Z9getReturnv
236209 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
237210 .long .Lline_table_start0 # DW_AT_stmt_list
238211 .long .Lskel_string0 # DW_AT_comp_dir
239- # DW_AT_GNU_pubnames
240212 .long .Lskel_string1 # DW_AT_GNU_dwo_name
241213 .quad 5976014880088676049 # DW_AT_GNU_dwo_id
242214 .quad .Lfunc_begin0 # DW_AT_low_pc
@@ -351,28 +323,6 @@ _Z9getReturnv: # @_Z9getReturnv
351323 .section .debug_addr,"",@progbits
352324.Laddr_table_base0:
353325 .quad .Lfunc_begin0
354- .section .debug_gnu_pubnames,"",@progbits
355- .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
356- .LpubNames_start0:
357- .short 2 # DWARF Version
358- .long .Lcu_begin0 # Offset of Compilation Unit Info
359- .long 48 # Compilation Unit Length
360- .long 25 # DIE offset
361- .byte 48 # Attributes: FUNCTION, EXTERNAL
362- .asciz "getReturn" # External Name
363- .long 0 # End Mark
364- .LpubNames_end0:
365- .section .debug_gnu_pubtypes,"",@progbits
366- .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
367- .LpubTypes_start0:
368- .short 2 # DWARF Version
369- .long .Lcu_begin0 # Offset of Compilation Unit Info
370- .long 48 # Compilation Unit Length
371- .long 41 # DIE offset
372- .byte 144 # Attributes: TYPE, STATIC
373- .asciz "int" # External Name
374- .long 0 # End Mark
375- .LpubTypes_end0:
376326 .ident "clang version 22.0.0"
377327 .section ".note.GNU-stack" ,"",@progbits
378328 .addrsig
0 commit comments