1
0
mirror of https://github.com/golang/go synced 2024-11-12 05:40:22 -07:00

dwarf: add extensions for multi-file compression (.dwz)

LGTM=iant
R=golang-codereviews, iant, bradfitz
CC=golang-codereviews, math-nuts
https://golang.org/cl/72820044
This commit is contained in:
Dhiru Kholia 2014-03-11 18:49:50 -07:00 committed by Ian Lance Taylor
parent ae9b661fa8
commit 5b5c8f0576
2 changed files with 6 additions and 2 deletions

View File

@ -212,6 +212,10 @@ const (
formExprloc format = 0x18
formFlagPresent format = 0x19
formRefSig8 format = 0x20
// Extensions for multi-file compression (.dwz)
// http://www.dwarfstd.org/ShowIssue.php?issue=120604.1
formGnuRefAlt format = 0x1f20
formGnuStrpAlt format = 0x1f21
)
// A Tag is the classification (the type) of an Entry.

View File

@ -241,10 +241,10 @@ func (b *buf) entry(atab abbrevTable, ubase Offset) *Entry {
// lineptr, loclistptr, macptr, rangelistptr
// New in DWARF 4, but clang can generate them with -gdwarf-2.
// Section reference, replacing use of formData4 and formData8.
case formSecOffset:
case formSecOffset, formGnuRefAlt, formGnuStrpAlt:
is64, known := b.format.dwarf64()
if !known {
b.error("unknown size for DW_FORM_sec_offset")
b.error("unknown size for form 0x" + strconv.FormatInt(int64(fmt), 16))
} else if is64 {
val = int64(b.uint64())
} else {