diff options
| author | Mark Wielaard <[email protected]> | 2012-06-22 12:02:45 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2012-08-09 16:32:43 +0200 |
| commit | 775375e3bd177cb19acb5020b6e0917551807276 (patch) | |
| tree | 26ec5e40f426d5ace9fd636818197cd0025b672a /src/readelf.c | |
| parent | 836db608432ba50f76c0a63ec7bd05694341a1d4 (diff) | |
libdw: Add support for DWZ multifile forms DW_FORM_GNU_ref_alt/strp_alt.
DWZ multifile forms http://www.dwarfstd.org/ShowIssue.php?issue=120604.1
DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt reference an alternative
debuginfo file. dwarf_begin and dwarf_begin_elf will try to use this
automatically. There are no user visible changes to the libdw interface.
dwarf_formref_die, dwarf_formstring and dwarf_formudata can now return
a Dwarf_Die which comes from a CU in the alternative Dwarf descriptor.
__libdw_read_offset was adjusted to take an alternative Dwarf descriptor
into account.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/readelf.c')
| -rw-r--r-- | src/readelf.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c index 9aaf4ece..36724a71 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -3651,6 +3651,20 @@ dwarf_form_string (unsigned int form) if (likely (form < nknown_forms)) result = known_forms[form]; + else + { + /* GNU extensions use vendor numbers. */ + switch (form) + { + case DW_FORM_GNU_ref_alt: + result = "GNU_ref_alt"; + break; + + case DW_FORM_GNU_strp_alt: + result = "GNU_strp_alt"; + break; + } + } if (unlikely (result == NULL)) { @@ -5593,6 +5607,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_FORM_indirect: case DW_FORM_strp: case DW_FORM_string: + case DW_FORM_GNU_strp_alt: if (cbargs->silent) break; const char *str = dwarf_formstring (attrp); @@ -5608,7 +5623,8 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_FORM_ref8: case DW_FORM_ref4: case DW_FORM_ref2: - case DW_FORM_ref1:; + case DW_FORM_ref1: + case DW_FORM_GNU_ref_alt: if (cbargs->silent) break; Dwarf_Die ref; |
