419 lines · plain
1# ppc32-debug-names.s was generated with:2 3# clang++ --target=powerpc -g -gpubnames \4# -fdebug-compilation-dir='/self/proc/cwd' -S a.cpp -o a.s5 6# a.cpp contents:7 8# struct t1 { };9# void f1(t1) { }10 11# REQUIRES: ppc12# RUN: rm -rf %t && split-file %s %t && cd %t13# RUN: llvm-mc -filetype=obj -triple=powerpc a.s -o a.o14# RUN: llvm-mc -filetype=obj -triple=powerpc b.s -o b.o15 16# RUN: ld.lld --debug-names --no-debug-names a.o b.o -o out017# RUN: llvm-readelf -SW out0 | FileCheck %s --check-prefix=NO_MERGE18 19# NO_MERGE: Name Type Address Off Size ES Flg Lk Inf Al20# NO_MERGE: .debug_names PROGBITS 00000000 [[#%x,]] 000110 00 0 0 421 22# RUN: ld.lld --debug-names a.o b.o -o out23 24# RUN: llvm-dwarfdump -debug-names out | FileCheck %s --check-prefix=DWARF25# RUN: llvm-readelf -SW out | FileCheck %s --check-prefix=READELF26 27# READELF: Name Type Address Off Size ES Flg Lk Inf Al28# READELF: .debug_names PROGBITS 00000000 [[#%x,]] 0000cc 00 0 0 429 30# DWARF: file format elf32-powerpc31# DWARF: .debug_names contents:32# DWARF: Name Index @ 0x0 {33# DWARF-NEXT: Header {34# DWARF-NEXT: Length: 0xC835# DWARF-NEXT: Format: DWARF3236# DWARF-NEXT: Version: 537# DWARF-NEXT: CU count: 238# DWARF-NEXT: Local TU count: 039# DWARF-NEXT: Foreign TU count: 040# DWARF-NEXT: Bucket count: 541# DWARF-NEXT: Name count: 542# DWARF-NEXT: Abbreviations table size: 0x1F43# DWARF-NEXT: Augmentation: 'LLVM0700'44# DWARF: Compilation Unit offsets [45# DWARF-NEXT: CU[0]: 0x0000000046# DWARF-NEXT: CU[1]: 0x0000000c47# DWARF: Abbreviations [48# DWARF-NEXT: Abbreviation 0x1 {49# DWARF: Tag: DW_TAG_structure_type50# DWARF-NEXT: DW_IDX_die_offset: DW_FORM_ref451# DWARF-NEXT: DW_IDX_parent: DW_FORM_flag_present52# DWARF-NEXT: DW_IDX_compile_unit: DW_FORM_data153# DWARF: Abbreviation 0x2 {54# DWARF-NEXT: Tag: DW_TAG_subprogram55# DWARF-NEXT: DW_IDX_die_offset: DW_FORM_ref456# DWARF-NEXT: DW_IDX_parent: DW_FORM_flag_present57# DWARF-NEXT: DW_IDX_compile_unit: DW_FORM_data158# DWARF: Abbreviation 0x3 {59# DWARF-NEXT: Tag: DW_TAG_base_type60# DWARF-NEXT: DW_IDX_die_offset: DW_FORM_ref461# DWARF-NEXT: DW_IDX_parent: DW_FORM_flag_present62# DWARF-NEXT: DW_IDX_compile_unit: DW_FORM_data163# DWARF: Bucket 0 [64# DWARF-NEXT: EMPTY65# DWARF-NEXT: ]66# DWARF-NEXT: Bucket 1 [67# DWARF-NEXT: Name 1 {68# DWARF-NEXT: Hash: 0x59796A69# DWARF-NEXT: String: 0x00000089 "t1"70# DWARF-NEXT: Entry @ 0xaa {71# DWARF-NEXT: Abbrev: 0x172# DWARF-NEXT: Tag: DW_TAG_structure_type73# DWARF-NEXT: DW_IDX_die_offset: 0x0000003a74# DWARF-NEXT: DW_IDX_parent: <parent not indexed>75# DWARF-NEXT: DW_IDX_compile_unit: 0x0076# DWARF-NEXT: }77# DWARF-NEXT: Entry @ 0xb0 {78# DWARF-NEXT: Abbrev: 0x179# DWARF-NEXT: Tag: DW_TAG_structure_type80# DWARF-NEXT: DW_IDX_die_offset: 0x0000004281# DWARF-NEXT: DW_IDX_parent: <parent not indexed>82# DWARF-NEXT: DW_IDX_compile_unit: 0x0183# DWARF-NEXT: }84# DWARF-NEXT: }85# DWARF-NEXT: Name 2 {86# DWARF-NEXT: Hash: 0x5355B2BE87# DWARF-NEXT: String: 0x00000080 "_Z2f12t1"88# DWARF-NEXT: Entry @ 0xbe {89# DWARF-NEXT: Abbrev: 0x290# DWARF-NEXT: Tag: DW_TAG_subprogram91# DWARF-NEXT: DW_IDX_die_offset: 0x0000002392# DWARF-NEXT: DW_IDX_parent: <parent not indexed>93# DWARF-NEXT: DW_IDX_compile_unit: 0x0094# DWARF-NEXT: }95# DWARF-NEXT: }96# DWARF-NEXT: Name 3 {97# DWARF-NEXT: Hash: 0x7C9A7F6A98# DWARF-NEXT: String: 0x0000010d "main"99# DWARF-NEXT: Entry @ 0xc5 {100# DWARF-NEXT: Abbrev: 0x2101# DWARF-NEXT: Tag: DW_TAG_subprogram102# DWARF-NEXT: DW_IDX_die_offset: 0x00000023103# DWARF-NEXT: DW_IDX_parent: <parent not indexed>104# DWARF-NEXT: DW_IDX_compile_unit: 0x01105# DWARF-NEXT: }106# DWARF-NEXT: }107# DWARF-NEXT: ]108# DWARF-NEXT: Bucket 2 [109# DWARF-NEXT: EMPTY110# DWARF-NEXT: ]111# DWARF-NEXT: Bucket 3 [112# DWARF-NEXT: Name 4 {113# DWARF-NEXT: Hash: 0xB888030114# DWARF-NEXT: String: 0x00000112 "int"115# DWARF-NEXT: Entry @ 0xb7 {116# DWARF-NEXT: Abbrev: 0x3117# DWARF-NEXT: Tag: DW_TAG_base_type118# DWARF-NEXT: DW_IDX_die_offset: 0x0000003e119# DWARF-NEXT: DW_IDX_parent: <parent not indexed>120# DWARF-NEXT: DW_IDX_compile_unit: 0x01121# DWARF-NEXT: }122# DWARF-NEXT: }123# DWARF-NEXT: ]124# DWARF-NEXT: Bucket 4 [125# DWARF-NEXT: Name 5 {126# DWARF-NEXT: Hash: 0x59779C127# DWARF-NEXT: String: 0x0000007d "f1"128# DWARF-NEXT: Entry @ 0xa3 {129# DWARF-NEXT: Abbrev: 0x2130# DWARF-NEXT: Tag: DW_TAG_subprogram131# DWARF-NEXT: DW_IDX_die_offset: 0x00000023132# DWARF-NEXT: DW_IDX_parent: <parent not indexed>133# DWARF-NEXT: DW_IDX_compile_unit: 0x00134# DWARF-NEXT: }135# DWARF-NEXT: }136# DWARF-NEXT: ]137 138#--- a.s139 .text140 .globl _Z2f12t1 # -- Begin function _Z2f12t1141 .p2align 2142 .type _Z2f12t1,@function143_Z2f12t1: # @_Z2f12t1144.Lfunc_begin0:145 .cfi_startproc146# %bb.0: # %entry147 #DEBUG_VALUE: f1: <- [$r3+0]148 stwu 1, -16(1)149 stw 31, 12(1)150 .cfi_def_cfa_offset 16151 .cfi_offset r31, -4152 mr 31, 1153 .cfi_def_cfa_register r31154.Ltmp0:155 lwz 31, 12(1)156 addi 1, 1, 16157 blr158.Ltmp1:159.Lfunc_end0:160 .size _Z2f12t1, .Lfunc_end0-.Lfunc_begin0161 .cfi_endproc162 # -- End function163 .section .debug_abbrev,"",@progbits164 .byte 0 # EOM(1)165 .byte 0 # EOM(2)166 .byte 0 # EOM(3)167 .section .debug_info,"",@progbits168.Lcu_begin0:169 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit170.Ldebug_info_start0:171 .short 5 # DWARF version number172 .byte 1 # DWARF Unit Type173 .byte 4 # Address Size (in bytes)174 .long .debug_abbrev # Offset Into Abbrev. Section175.Ldebug_info_end0:176 .section .debug_str_offsets,"",@progbits177 .long 28 # Length of String Offsets Set178 .short 5179 .short 0180.Lstr_offsets_base0:181 .section .debug_str,"MS",@progbits,1182.Linfo_string0:183 .asciz "clang version 19.0.0git (git@github.com:llvm/llvm-project.git 53b14cd9ce2b57da73d173fc876d2e9e199f5640)" # string offset=0184.Linfo_string1:185 .asciz "a.cpp" # string offset=104186.Linfo_string2:187 .asciz "/proc/self/cwd" # string offset=110188.Linfo_string3:189 .asciz "f1" # string offset=125190.Linfo_string4:191 .asciz "_Z2f12t1" # string offset=128192.Linfo_string5:193 .asciz "t1" # string offset=137194.Laddr_table_base0:195 .long .Lfunc_begin0196.Ldebug_addr_end0:197 .section .debug_names,"",@progbits198 .long .Lnames_end0-.Lnames_start0 # Header: unit length199.Lnames_start0:200 .short 5 # Header: version201 .short 0 # Header: padding202 .long 1 # Header: compilation unit count203 .long 0 # Header: local type unit count204 .long 0 # Header: foreign type unit count205 .long 3 # Header: bucket count206 .long 3 # Header: name count207 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size208 .long 8 # Header: augmentation string size209 .ascii "LLVM0700" # Header: augmentation string210 .long .Lcu_begin0 # Compilation unit 0211 .long 0 # Bucket 0212 .long 1 # Bucket 1213 .long 3 # Bucket 2214 .long 5863324 # Hash in Bucket 1215 .long 5863786 # Hash in Bucket 1216 .long 1398125246 # Hash in Bucket 2217 .long .Linfo_string3 # String in Bucket 1: f1218 .long .Linfo_string5 # String in Bucket 1: t1219 .long .Linfo_string4 # String in Bucket 2: _Z2f12t1220 .long .Lnames0-.Lnames_entries0 # Offset in Bucket 1221 .long .Lnames2-.Lnames_entries0 # Offset in Bucket 1222 .long .Lnames1-.Lnames_entries0 # Offset in Bucket 2223.Lnames_abbrev_start0:224 .byte 1 # Abbrev code225 .byte 46 # DW_TAG_subprogram226 .byte 3 # DW_IDX_die_offset227 .byte 19 # DW_FORM_ref4228 .byte 4 # DW_IDX_parent229 .byte 25 # DW_FORM_flag_present230 .byte 0 # End of abbrev231 .byte 0 # End of abbrev232 .byte 2 # Abbrev code233 .byte 19 # DW_TAG_structure_type234 .byte 3 # DW_IDX_die_offset235 .byte 19 # DW_FORM_ref4236 .byte 4 # DW_IDX_parent237 .byte 25 # DW_FORM_flag_present238 .byte 0 # End of abbrev239 .byte 0 # End of abbrev240 .byte 0 # End of abbrev list241.Lnames_abbrev_end0:242.Lnames_entries0:243.Lnames0:244.L1:245 .byte 1 # Abbreviation code246 .long 35 # DW_IDX_die_offset247 .byte 0 # DW_IDX_parent248 # End of list: f1249.Lnames2:250.L0:251 .byte 2 # Abbreviation code252 .long 58 # DW_IDX_die_offset253 .byte 0 # DW_IDX_parent254 # End of list: t1255.Lnames1:256 .byte 1 # Abbreviation code257 .long 35 # DW_IDX_die_offset258 .byte 0 # DW_IDX_parent259 # End of list: _Z2f12t1260 .p2align 2, 0x0261.Lnames_end0:262 .ident "clang version 19.0.0git (git@github.com:llvm/llvm-project.git 53b14cd9ce2b57da73d173fc876d2e9e199f5640)"263 .section ".note.GNU-stack","",@progbits264 .addrsig265 .section .debug_line,"",@progbits266.Lline_table_start0:267 268#--- b.s269# Generated with:270# - clang++ --target=powerpc -g -O0 -gpubnames \271# -fdebug-compilation-dir='/self/proc/cwd' -S b.cpp -o b.s272 273# b.cpp contents:274 275# struct t1 { };276# int main() {277# t1 v1;278# }279#280 .text281 .globl main # -- Begin function main282 .p2align 2283 .type main,@function284main: # @main285.Lfunc_begin0:286 .cfi_startproc287# %bb.0: # %entry288 stwu 1, -16(1)289 stw 31, 12(1)290 .cfi_def_cfa_offset 16291 .cfi_offset r31, -4292 mr 31, 1293 .cfi_def_cfa_register r31294 li 3, 0295.Ltmp0:296 lwz 31, 12(1)297 addi 1, 1, 16298 blr299.Ltmp1:300.Lfunc_end0:301 .size main, .Lfunc_end0-.Lfunc_begin0302 .cfi_endproc303 # -- End function304 .section .debug_abbrev,"",@progbits305 .byte 0 # EOM(1)306 .byte 0 # EOM(2)307 .byte 0 # EOM(3)308 .section .debug_info,"",@progbits309.Lcu_begin0:310 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit311.Ldebug_info_start0:312 .short 5 # DWARF version number313 .byte 1 # DWARF Unit Type314 .byte 4 # Address Size (in bytes)315 .long .debug_abbrev # Offset Into Abbrev. Section316.Ldebug_info_end0:317 .section .debug_str_offsets,"",@progbits318 .long 32 # Length of String Offsets Set319 .short 5320 .short 0321.Lstr_offsets_base0:322 .section .debug_str,"MS",@progbits,1323.Linfo_string0:324 .asciz "clang version 19.0.0git (git@github.com:llvm/llvm-project.git 53b14cd9ce2b57da73d173fc876d2e9e199f5640)" # string offset=0325.Linfo_string1:326 .asciz "b.cpp" # string offset=104327.Linfo_string2:328 .asciz "/proc/self/cwd" # string offset=110329.Linfo_string3:330 .asciz "main" # string offset=125331.Linfo_string4:332 .asciz "int" # string offset=130333.Linfo_string5:334 .asciz "v1" # string offset=134335.Linfo_string6:336 .asciz "t1" # string offset=137337.Laddr_table_base0:338 .long .Lfunc_begin0339.Ldebug_addr_end0:340 .section .debug_names,"",@progbits341 .long .Lnames_end0-.Lnames_start0 # Header: unit length342.Lnames_start0:343 .short 5 # Header: version344 .short 0 # Header: padding345 .long 1 # Header: compilation unit count346 .long 0 # Header: local type unit count347 .long 0 # Header: foreign type unit count348 .long 3 # Header: bucket count349 .long 3 # Header: name count350 .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size351 .long 8 # Header: augmentation string size352 .ascii "LLVM0700" # Header: augmentation string353 .long .Lcu_begin0 # Compilation unit 0354 .long 0 # Bucket 0355 .long 1 # Bucket 1356 .long 3 # Bucket 2357 .long 5863786 # Hash in Bucket 1358 .long 2090499946 # Hash in Bucket 1359 .long 193495088 # Hash in Bucket 2360 .long .Linfo_string6 # String in Bucket 1: t1361 .long .Linfo_string3 # String in Bucket 1: main362 .long .Linfo_string4 # String in Bucket 2: int363 .long .Lnames2-.Lnames_entries0 # Offset in Bucket 1364 .long .Lnames0-.Lnames_entries0 # Offset in Bucket 1365 .long .Lnames1-.Lnames_entries0 # Offset in Bucket 2366.Lnames_abbrev_start0:367 .byte 1 # Abbrev code368 .byte 19 # DW_TAG_structure_type369 .byte 3 # DW_IDX_die_offset370 .byte 19 # DW_FORM_ref4371 .byte 4 # DW_IDX_parent372 .byte 25 # DW_FORM_flag_present373 .byte 0 # End of abbrev374 .byte 0 # End of abbrev375 .byte 2 # Abbrev code376 .byte 46 # DW_TAG_subprogram377 .byte 3 # DW_IDX_die_offset378 .byte 19 # DW_FORM_ref4379 .byte 4 # DW_IDX_parent380 .byte 25 # DW_FORM_flag_present381 .byte 0 # End of abbrev382 .byte 0 # End of abbrev383 .byte 3 # Abbrev code384 .byte 36 # DW_TAG_base_type385 .byte 3 # DW_IDX_die_offset386 .byte 19 # DW_FORM_ref4387 .byte 4 # DW_IDX_parent388 .byte 25 # DW_FORM_flag_present389 .byte 0 # End of abbrev390 .byte 0 # End of abbrev391 .byte 0 # End of abbrev list392.Lnames_abbrev_end0:393.Lnames_entries0:394.Lnames2:395.L1:396 .byte 1 # Abbreviation code397 .long 66 # DW_IDX_die_offset398 .byte 0 # DW_IDX_parent399 # End of list: t1400.Lnames0:401.L2:402 .byte 2 # Abbreviation code403 .long 35 # DW_IDX_die_offset404 .byte 0 # DW_IDX_parent405 # End of list: main406.Lnames1:407.L0:408 .byte 3 # Abbreviation code409 .long 62 # DW_IDX_die_offset410 .byte 0 # DW_IDX_parent411 # End of list: int412 .p2align 2, 0x0413.Lnames_end0:414 .ident "clang version 19.0.0git (git@github.com:llvm/llvm-project.git 53b14cd9ce2b57da73d173fc876d2e9e199f5640)"415 .section ".note.GNU-stack","",@progbits416 .addrsig417 .section .debug_line,"",@progbits418.Lline_table_start0:419