678 lines · yaml
1# struct Type {};2#3# template <typename _Tp, bool, bool, bool> struct _Optional_payload;4#5# template <typename _Tp> struct _Optional_payload<_Tp, true, false, false> {};6#7# template <typename _Tp, bool _Copy, bool _Move>8# struct _Optional_payload<_Tp, false, _Copy, _Move>9# : _Optional_payload<_Tp, true, false, false> {};10#11# int main() {12# _Optional_payload<Type, false, false, true> X;13# }14#15# YAML generated on Linux using obj2yaml on the above program compiled with16# G++. This is malformed DWARF that is missing DW_TAG_template_value_parameter17# entries, which is important for the test because that makes the two18# specializations look like identical structure definitions.19--- !ELF20FileHeader:21 Class: ELFCLASS6422 Data: ELFDATA2LSB23 Type: ET_DYN24 Machine: EM_X86_6425 Entry: 0x104026ProgramHeaders:27 - Type: PT_PHDR28 Flags: [ PF_R ]29 VAddr: 0x4030 Align: 0x831 Offset: 0x4032 - Type: PT_INTERP33 Flags: [ PF_R ]34 FirstSec: .interp35 LastSec: .interp36 VAddr: 0x31837 Offset: 0x31838 - Type: PT_LOAD39 Flags: [ PF_R ]40 FirstSec: .interp41 LastSec: .rela.dyn42 Align: 0x100043 Offset: 0x044 - Type: PT_LOAD45 Flags: [ PF_X, PF_R ]46 FirstSec: .init47 LastSec: .fini48 VAddr: 0x100049 Align: 0x100050 Offset: 0x100051 - Type: PT_LOAD52 Flags: [ PF_R ]53 FirstSec: .rodata54 LastSec: .eh_frame55 VAddr: 0x200056 Align: 0x100057 Offset: 0x200058 - Type: PT_LOAD59 Flags: [ PF_W, PF_R ]60 FirstSec: .init_array61 LastSec: .bss62 VAddr: 0x3DF063 Align: 0x100064 Offset: 0x2DF065 - Type: PT_DYNAMIC66 Flags: [ PF_W, PF_R ]67 FirstSec: .dynamic68 LastSec: .dynamic69 VAddr: 0x3E0070 Align: 0x871 Offset: 0x2E0072 - Type: PT_NOTE73 Flags: [ PF_R ]74 FirstSec: .note.gnu.property75 LastSec: .note.gnu.property76 VAddr: 0x33877 Align: 0x878 Offset: 0x33879 - Type: PT_NOTE80 Flags: [ PF_R ]81 FirstSec: .note.gnu.build-id82 LastSec: .note.ABI-tag83 VAddr: 0x35884 Align: 0x485 Offset: 0x35886 - Type: PT_GNU_PROPERTY87 Flags: [ PF_R ]88 FirstSec: .note.gnu.property89 LastSec: .note.gnu.property90 VAddr: 0x33891 Align: 0x892 Offset: 0x33893 - Type: PT_GNU_EH_FRAME94 Flags: [ PF_R ]95 FirstSec: .eh_frame_hdr96 LastSec: .eh_frame_hdr97 VAddr: 0x200498 Align: 0x499 Offset: 0x2004100 - Type: PT_GNU_STACK101 Flags: [ PF_W, PF_R ]102 Align: 0x10103 Offset: 0x0104 - Type: PT_GNU_RELRO105 Flags: [ PF_R ]106 FirstSec: .init_array107 LastSec: .got108 VAddr: 0x3DF0109 Offset: 0x2DF0110Sections:111 - Name: .interp112 Type: SHT_PROGBITS113 Flags: [ SHF_ALLOC ]114 Address: 0x318115 AddressAlign: 0x1116 Content: 2F6C696236342F6C642D6C696E75782D7838362D36342E736F2E3200117 - Name: .note.gnu.property118 Type: SHT_NOTE119 Flags: [ SHF_ALLOC ]120 Address: 0x338121 AddressAlign: 0x8122 Notes:123 - Name: GNU124 Desc: 020000C0040000000300000000000000125 Type: NT_GNU_PROPERTY_TYPE_0126 - Name: .note.gnu.build-id127 Type: SHT_NOTE128 Flags: [ SHF_ALLOC ]129 Address: 0x358130 AddressAlign: 0x4131 Notes:132 - Name: GNU133 Desc: AF3A83002F03E80537DCB46B3E56062984AD2629134 Type: NT_PRPSINFO135 - Name: .note.ABI-tag136 Type: SHT_NOTE137 Flags: [ SHF_ALLOC ]138 Address: 0x37C139 AddressAlign: 0x4140 Notes:141 - Name: GNU142 Desc: '00000000030000000200000000000000'143 Type: NT_VERSION144 - Name: .gnu.hash145 Type: SHT_GNU_HASH146 Flags: [ SHF_ALLOC ]147 Address: 0x3A0148 Link: .dynsym149 AddressAlign: 0x8150 Header:151 SymNdx: 0x5152 Shift2: 0x6153 BloomFilter: [ 0x810000 ]154 HashBuckets: [ 0x5, 0x0 ]155 HashValues: [ 0x6DCE65D1 ]156 - Name: .dynsym157 Type: SHT_DYNSYM158 Flags: [ SHF_ALLOC ]159 Address: 0x3C8160 Link: .dynstr161 AddressAlign: 0x8162 - Name: .dynstr163 Type: SHT_STRTAB164 Flags: [ SHF_ALLOC ]165 Address: 0x458166 AddressAlign: 0x1167 - Name: .gnu.version168 Type: SHT_GNU_versym169 Flags: [ SHF_ALLOC ]170 Address: 0x4D6171 Link: .dynsym172 AddressAlign: 0x2173 Entries: [ 0, 0, 2, 0, 0, 2 ]174 - Name: .gnu.version_r175 Type: SHT_GNU_verneed176 Flags: [ SHF_ALLOC ]177 Address: 0x4E8178 Link: .dynstr179 AddressAlign: 0x8180 Dependencies:181 - Version: 1182 File: libc.so.6183 Entries:184 - Name: GLIBC_2.2.5185 Hash: 157882997186 Flags: 0187 Other: 2188 - Name: .rela.dyn189 Type: SHT_RELA190 Flags: [ SHF_ALLOC ]191 Address: 0x508192 Link: .dynsym193 AddressAlign: 0x8194 Relocations:195 - Offset: 0x3DF0196 Type: R_X86_64_RELATIVE197 Addend: 4384198 - Offset: 0x3DF8199 Type: R_X86_64_RELATIVE200 Addend: 4320201 - Offset: 0x4008202 Type: R_X86_64_RELATIVE203 Addend: 16392204 - Offset: 0x3FD8205 Symbol: _ITM_deregisterTMCloneTable206 Type: R_X86_64_GLOB_DAT207 - Offset: 0x3FE0208 Symbol: __libc_start_main209 Type: R_X86_64_GLOB_DAT210 - Offset: 0x3FE8211 Symbol: __gmon_start__212 Type: R_X86_64_GLOB_DAT213 - Offset: 0x3FF0214 Symbol: _ITM_registerTMCloneTable215 Type: R_X86_64_GLOB_DAT216 - Offset: 0x3FF8217 Symbol: __cxa_finalize218 Type: R_X86_64_GLOB_DAT219 - Name: .init220 Type: SHT_PROGBITS221 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]222 Address: 0x1000223 AddressAlign: 0x4224 Offset: 0x1000225 Content: F30F1EFA4883EC08488B05D92F00004885C07402FFD04883C408C3226 - Name: .plt227 Type: SHT_PROGBITS228 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]229 Address: 0x1020230 AddressAlign: 0x10231 EntSize: 0x10232 Content: FF35A22F0000F2FF25A32F00000F1F00233 - Name: .plt.got234 Type: SHT_PROGBITS235 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]236 Address: 0x1030237 AddressAlign: 0x10238 EntSize: 0x10239 Content: F30F1EFAF2FF25BD2F00000F1F440000240 - Name: .text241 Type: SHT_PROGBITS242 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]243 Address: 0x1040244 AddressAlign: 0x10245 Content: F30F1EFA31ED4989D15E4889E24883E4F050544C8D0556010000488D0DDF000000488D3DC1000000FF15722F0000F490488D3D992F0000488D05922F00004839F87415488B054E2F00004885C07409FFE00F1F8000000000C30F1F8000000000488D3D692F0000488D35622F00004829FE4889F048C1EE3F48C1F8034801C648D1FE7414488B05252F00004885C07408FFE0660F1F440000C30F1F8000000000F30F1EFA803D252F000000752B5548833D022F0000004889E5740C488B3D062F0000E829FFFFFFE864FFFFFFC605FD2E0000015DC30F1F00C30F1F8000000000F30F1EFAE977FFFFFFF30F1EFA554889E5B8000000005DC30F1F840000000000F30F1EFA41574C8D3DA32C000041564989D641554989F541544189FC55488D2D942C0000534C29FD4883EC08E88FFEFFFF48C1FD03741F31DB0F1F80000000004C89F24C89EE4489E741FF14DF4883C3014839DD75EA4883C4085B5D415C415D415E415FC366662E0F1F840000000000F30F1EFAC3246 - Name: .fini247 Type: SHT_PROGBITS248 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]249 Address: 0x11B8250 AddressAlign: 0x4251 Content: F30F1EFA4883EC084883C408C3252 - Name: .rodata253 Type: SHT_PROGBITS254 Flags: [ SHF_ALLOC, SHF_MERGE ]255 Address: 0x2000256 AddressAlign: 0x4257 EntSize: 0x4258 Offset: 0x2000259 Content: '01000200'260 - Name: .eh_frame_hdr261 Type: SHT_PROGBITS262 Flags: [ SHF_ALLOC ]263 Address: 0x2004264 AddressAlign: 0x4265 Content: 011B033B38000000060000001CF0FFFF6C0000002CF0FFFF940000003CF0FFFF5400000025F1FFFFAC0000003CF1FFFFCC000000ACF1FFFF14010000266 - Name: .eh_frame267 Type: SHT_PROGBITS268 Flags: [ SHF_ALLOC ]269 Address: 0x2040270 AddressAlign: 0x8271 Content: 1400000000000000017A5200017810011B0C070890010000140000001C000000E0EFFFFF2F00000000440710000000002400000034000000A8EFFFFF10000000000E10460E184A0F0B770880003F1A3A2A33242200000000140000005C00000090EFFFFF1000000000000000000000001C0000007400000071F0FFFF0F00000000450E108602430D06460C0708000000440000009400000068F0FFFF6500000000460E108F02490E188E03450E208D04450E288C05440E308606480E388307470E406E0E38410E30410E28420E20420E18420E10420E080010000000DC00000090F0FFFF050000000000000000000000272 - Name: .init_array273 Type: SHT_INIT_ARRAY274 Flags: [ SHF_WRITE, SHF_ALLOC ]275 Address: 0x3DF0276 AddressAlign: 0x8277 EntSize: 0x8278 Offset: 0x2DF0279 Content: '2011000000000000'280 - Name: .fini_array281 Type: SHT_FINI_ARRAY282 Flags: [ SHF_WRITE, SHF_ALLOC ]283 Address: 0x3DF8284 AddressAlign: 0x8285 EntSize: 0x8286 Content: E010000000000000287 - Name: .dynamic288 Type: SHT_DYNAMIC289 Flags: [ SHF_WRITE, SHF_ALLOC ]290 Address: 0x3E00291 Link: .dynstr292 AddressAlign: 0x8293 Entries:294 - Tag: DT_NEEDED295 Value: 0x1296 - Tag: DT_INIT297 Value: 0x1000298 - Tag: DT_FINI299 Value: 0x11B8300 - Tag: DT_INIT_ARRAY301 Value: 0x3DF0302 - Tag: DT_INIT_ARRAYSZ303 Value: 0x8304 - Tag: DT_FINI_ARRAY305 Value: 0x3DF8306 - Tag: DT_FINI_ARRAYSZ307 Value: 0x8308 - Tag: DT_GNU_HASH309 Value: 0x3A0310 - Tag: DT_STRTAB311 Value: 0x458312 - Tag: DT_SYMTAB313 Value: 0x3C8314 - Tag: DT_STRSZ315 Value: 0x7D316 - Tag: DT_SYMENT317 Value: 0x18318 - Tag: DT_DEBUG319 Value: 0x0320 - Tag: DT_PLTGOT321 Value: 0x3FC0322 - Tag: DT_RELA323 Value: 0x508324 - Tag: DT_RELASZ325 Value: 0xC0326 - Tag: DT_RELAENT327 Value: 0x18328 - Tag: DT_FLAGS329 Value: 0x8330 - Tag: DT_FLAGS_1331 Value: 0x8000001332 - Tag: DT_VERNEED333 Value: 0x4E8334 - Tag: DT_VERNEEDNUM335 Value: 0x1336 - Tag: DT_VERSYM337 Value: 0x4D6338 - Tag: DT_RELACOUNT339 Value: 0x3340 - Tag: DT_NULL341 Value: 0x0342 - Tag: DT_NULL343 Value: 0x0344 - Tag: DT_NULL345 Value: 0x0346 - Tag: DT_NULL347 Value: 0x0348 - Tag: DT_NULL349 Value: 0x0350 - Name: .got351 Type: SHT_PROGBITS352 Flags: [ SHF_WRITE, SHF_ALLOC ]353 Address: 0x3FC0354 AddressAlign: 0x8355 EntSize: 0x8356 Content: '003E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'357 - Name: .data358 Type: SHT_PROGBITS359 Flags: [ SHF_WRITE, SHF_ALLOC ]360 Address: 0x4000361 AddressAlign: 0x8362 Content: '00000000000000000840000000000000'363 - Name: .bss364 Type: SHT_NOBITS365 Flags: [ SHF_WRITE, SHF_ALLOC ]366 Address: 0x4010367 AddressAlign: 0x1368 Size: 0x8369 - Name: .comment370 Type: SHT_PROGBITS371 Flags: [ SHF_MERGE, SHF_STRINGS ]372 AddressAlign: 0x1373 EntSize: 0x1374 Content: 4743433A20285562756E747520392E342E302D317562756E7475317E32302E30342E322920392E342E3000375 - Name: .debug_info376 Type: SHT_PROGBITS377 AddressAlign: 0x1378 Content: 9E00000004000000000008013A0000000431000000FE00000029110000000000000F000000000000000000000002000000000101010803D2000000010105204D000000045F5470002D000000000305000000010108086A000000053600000000045F5470002D0000000006CD000000010B059A00000029110000000000000F00000000000000019C9A000000075800010C2F4D00000002916F00080405696E740000379 - Name: .debug_abbrev380 Type: SHT_PROGBITS381 AddressAlign: 0x1382 Content: 011101250E130B030E1B0E1101120710170000021300030E0B0B3A0B3B0B390B0000031301030E0B0B3A0B3B0B390B01130000042F00030849130000051C004913380B0000062E013F19030E3A0B3B0B390B49131101120740189742190113000007340003083A0B3B0B390B4913021800000824000B0B3E0B0308000000383 - Name: .debug_line384 Type: SHT_PROGBITS385 AddressAlign: 0x1386 Content: 3D00000003001F0000000101FB0E0D000101010100000001000001006D61696E2E6370700000000000050C0009022911000000000000030A010501840207000101387Symbols:388 - Name: .interp389 Type: STT_SECTION390 Section: .interp391 Value: 0x318392 - Name: .note.gnu.property393 Type: STT_SECTION394 Section: .note.gnu.property395 Value: 0x338396 - Name: .note.gnu.build-id397 Type: STT_SECTION398 Section: .note.gnu.build-id399 Value: 0x358400 - Name: .note.ABI-tag401 Type: STT_SECTION402 Section: .note.ABI-tag403 Value: 0x37C404 - Name: .gnu.hash405 Type: STT_SECTION406 Section: .gnu.hash407 Value: 0x3A0408 - Name: .dynsym409 Type: STT_SECTION410 Section: .dynsym411 Value: 0x3C8412 - Name: .dynstr413 Type: STT_SECTION414 Section: .dynstr415 Value: 0x458416 - Name: .gnu.version417 Type: STT_SECTION418 Section: .gnu.version419 Value: 0x4D6420 - Name: .gnu.version_r421 Type: STT_SECTION422 Section: .gnu.version_r423 Value: 0x4E8424 - Name: .rela.dyn425 Type: STT_SECTION426 Section: .rela.dyn427 Value: 0x508428 - Name: .init429 Type: STT_SECTION430 Section: .init431 Value: 0x1000432 - Name: .plt433 Type: STT_SECTION434 Section: .plt435 Value: 0x1020436 - Name: .plt.got437 Type: STT_SECTION438 Section: .plt.got439 Value: 0x1030440 - Name: .text441 Type: STT_SECTION442 Section: .text443 Value: 0x1040444 - Name: .fini445 Type: STT_SECTION446 Section: .fini447 Value: 0x11B8448 - Name: .rodata449 Type: STT_SECTION450 Section: .rodata451 Value: 0x2000452 - Name: .eh_frame_hdr453 Type: STT_SECTION454 Section: .eh_frame_hdr455 Value: 0x2004456 - Name: .eh_frame457 Type: STT_SECTION458 Section: .eh_frame459 Value: 0x2040460 - Name: .init_array461 Type: STT_SECTION462 Section: .init_array463 Value: 0x3DF0464 - Name: .fini_array465 Type: STT_SECTION466 Section: .fini_array467 Value: 0x3DF8468 - Name: .dynamic469 Type: STT_SECTION470 Section: .dynamic471 Value: 0x3E00472 - Name: .got473 Type: STT_SECTION474 Section: .got475 Value: 0x3FC0476 - Name: .data477 Type: STT_SECTION478 Section: .data479 Value: 0x4000480 - Name: .bss481 Type: STT_SECTION482 Section: .bss483 Value: 0x4010484 - Name: .comment485 Type: STT_SECTION486 Section: .comment487 - Name: .debug_aranges488 Type: STT_SECTION489 Section: .debug_aranges490 - Name: .debug_info491 Type: STT_SECTION492 Section: .debug_info493 - Name: .debug_abbrev494 Type: STT_SECTION495 Section: .debug_abbrev496 - Name: .debug_line497 Type: STT_SECTION498 Section: .debug_line499 - Name: .debug_str500 Type: STT_SECTION501 Section: .debug_str502 - Name: crtstuff.c503 Type: STT_FILE504 Index: SHN_ABS505 - Name: deregister_tm_clones506 Type: STT_FUNC507 Section: .text508 Value: 0x1070509 - Name: register_tm_clones510 Type: STT_FUNC511 Section: .text512 Value: 0x10A0513 - Name: __do_global_dtors_aux514 Type: STT_FUNC515 Section: .text516 Value: 0x10E0517 - Name: completed.8061518 Type: STT_OBJECT519 Section: .bss520 Value: 0x4010521 Size: 0x1522 - Name: __do_global_dtors_aux_fini_array_entry523 Type: STT_OBJECT524 Section: .fini_array525 Value: 0x3DF8526 - Name: frame_dummy527 Type: STT_FUNC528 Section: .text529 Value: 0x1120530 - Name: __frame_dummy_init_array_entry531 Type: STT_OBJECT532 Section: .init_array533 Value: 0x3DF0534 - Name: main.cpp535 Type: STT_FILE536 Index: SHN_ABS537 - Name: 'crtstuff.c (1)'538 Type: STT_FILE539 Index: SHN_ABS540 - Name: __FRAME_END__541 Type: STT_OBJECT542 Section: .eh_frame543 Value: 0x212C544 - Type: STT_FILE545 Index: SHN_ABS546 - Name: __init_array_end547 Section: .init_array548 Value: 0x3DF8549 - Name: _DYNAMIC550 Type: STT_OBJECT551 Section: .dynamic552 Value: 0x3E00553 - Name: __init_array_start554 Section: .init_array555 Value: 0x3DF0556 - Name: __GNU_EH_FRAME_HDR557 Section: .eh_frame_hdr558 Value: 0x2004559 - Name: _GLOBAL_OFFSET_TABLE_560 Type: STT_OBJECT561 Section: .got562 Value: 0x3FC0563 - Name: _init564 Type: STT_FUNC565 Section: .init566 Value: 0x1000567 - Name: __libc_csu_fini568 Type: STT_FUNC569 Section: .text570 Binding: STB_GLOBAL571 Value: 0x11B0572 Size: 0x5573 - Name: _ITM_deregisterTMCloneTable574 Binding: STB_WEAK575 - Name: data_start576 Section: .data577 Binding: STB_WEAK578 Value: 0x4000579 - Name: _edata580 Section: .data581 Binding: STB_GLOBAL582 Value: 0x4010583 - Name: _fini584 Type: STT_FUNC585 Section: .fini586 Binding: STB_GLOBAL587 Value: 0x11B8588 Other: [ STV_HIDDEN ]589 - Name: '__libc_start_main@@GLIBC_2.2.5'590 Type: STT_FUNC591 Binding: STB_GLOBAL592 - Name: __data_start593 Section: .data594 Binding: STB_GLOBAL595 Value: 0x4000596 - Name: __gmon_start__597 Binding: STB_WEAK598 - Name: __dso_handle599 Type: STT_OBJECT600 Section: .data601 Binding: STB_GLOBAL602 Value: 0x4008603 Other: [ STV_HIDDEN ]604 - Name: _IO_stdin_used605 Type: STT_OBJECT606 Section: .rodata607 Binding: STB_GLOBAL608 Value: 0x2000609 Size: 0x4610 - Name: __libc_csu_init611 Type: STT_FUNC612 Section: .text613 Binding: STB_GLOBAL614 Value: 0x1140615 Size: 0x65616 - Name: _end617 Section: .bss618 Binding: STB_GLOBAL619 Value: 0x4018620 - Name: _start621 Type: STT_FUNC622 Section: .text623 Binding: STB_GLOBAL624 Value: 0x1040625 Size: 0x2F626 - Name: __bss_start627 Section: .bss628 Binding: STB_GLOBAL629 Value: 0x4010630 - Name: main631 Type: STT_FUNC632 Section: .text633 Binding: STB_GLOBAL634 Value: 0x1129635 Size: 0xF636 - Name: __TMC_END__637 Type: STT_OBJECT638 Section: .data639 Binding: STB_GLOBAL640 Value: 0x4010641 Other: [ STV_HIDDEN ]642 - Name: _ITM_registerTMCloneTable643 Binding: STB_WEAK644 - Name: '__cxa_finalize@@GLIBC_2.2.5'645 Type: STT_FUNC646 Binding: STB_WEAK647DynamicSymbols:648 - Name: _ITM_deregisterTMCloneTable649 Binding: STB_WEAK650 - Name: __libc_start_main651 Type: STT_FUNC652 Binding: STB_GLOBAL653 - Name: __gmon_start__654 Binding: STB_WEAK655 - Name: _ITM_registerTMCloneTable656 Binding: STB_WEAK657 - Name: __cxa_finalize658 Type: STT_FUNC659 Binding: STB_WEAK660DWARF:661 debug_str:662 - Type663 - '_Optional_payload<Type, false, false, true>'664 - main.cpp665 - 'GNU C++14 9.4.0 -mtune=generic -march=x86-64 -g -O0 -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection'666 - main667 - '_Optional_payload<Type, true, false, false>'668 - '/root/os-llvm/llvm-project'669 debug_aranges:670 - Length: 0x2C671 Version: 2672 CuOffset: 0x0673 AddressSize: 0x8674 Descriptors:675 - Address: 0x1129676 Length: 0xF677...678