This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Fix readelf for DW_FORM_ref_udata
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: binutils at sourceware dot org
- Date: Fri, 21 Oct 2011 18:26:56 +0200
- Subject: [patch] Fix readelf for DW_FORM_ref_udata
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)