mirror of
https://github.com/golang/go
synced 2024-11-06 13:46:16 -07:00
6044dd098d
Currently, if the .debug_abbrev section of an ELF file contains attributes that aren't known to the dwarf package and that have form formSecOffset, the dwarf package will fail to open the DWARF data with an error like "decoding dwarf section abbrev at offset 0x17: cannot determine class of unknown attribute with formSecOffset". For the most part, the class is implied by the form encoded in the abbrev section, but formSecOffset can imply many different DWARF classes. Hence, debug/dwarf disambiguates these using a table of known attributes. However, it will reject the entire image if it encounters an attribute it can't determine the class of. This is particularly unfortunate because the caller may never even uses the offending attribute. Fix this by introducing a ClassUnknown attribute class to use as a fallback in these cases. This allows the dwarf package to load the DWARF data and isolates the problem to just the affected attributes. Fixes #12592. Change-Id: I766227b136e9757f8b89c0b3ab8e9ddea899d94f Reviewed-on: https://go-review.googlesource.com/14541 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: jcd . <jcd@golang.org> |
||
---|---|---|
.. | ||
dwarf | ||
elf | ||
gosym | ||
macho | ||
pe | ||
plan9obj |