[patch] Fix readelf for DW_FORM_ref_udata
Jan Kratochvil
jan.kratochvil@redhat.com
Fri Oct 21 17:53:00 GMT 2011
Hi,
when one uses DW_FORM_ref_udata readelf displays invalid values.
Why DW_FORM_ref8 is not there I find outside of the scope of this patch;
dwarf.c tries to handle cases when it has no 64-bit integers.
No regressions on {x86_64,x86_64-m32,i686}-fedora16pre-linux-gnu.
OK to check it in? Probably obvious.
Thanks,
Jan
binutils/
2011-10-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf.c (read_and_display_attr_value) <DW_AT_import>: Add CU_OFFSET
also for DW_FORM_ref_udata.
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -1769,7 +1769,8 @@ read_and_display_attr_value (unsigned long attribute,
if (form == DW_FORM_ref1
|| form == DW_FORM_ref2
- || form == DW_FORM_ref4)
+ || form == DW_FORM_ref4
+ || form == DW_FORM_ref_udata)
uvalue += cu_offset;
if (uvalue >= section->size)
More information about the Binutils
mailing list