[patch] Add support for DW_FORM_ref_sig8 to BFD

Cary Coutant ccoutant@google.com
Fri Jan 15 20:26:00 GMT 2010


This patch adds support for the new DWARF-4 form DW_FORM_ref_sig8 to
bfd/dwarf2.c, so that it doesn't complain when trying to read objects
compiled with gcc's -gdwarf-4 option. There's nothing in this code
that actually needs to follow a reference of this form, but it at
least needs to recognize the form and read the 8 bytes.

OK?

-cary


bfd/ChangeLog:

        * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.


Index: dwarf2.c
===================================================================
RCS file: /cvs/src/src/bfd/dwarf2.c,v
retrieving revision 1.129
diff -u -p -r1.129 dwarf2.c
--- dwarf2.c	11 Jan 2010 09:43:08 -0000	1.129
+++ dwarf2.c	15 Jan 2010 20:22:17 -0000
@@ -858,6 +858,10 @@ read_attribute_value (struct attribute *
       attr->u.val = read_8_bytes (abfd, info_ptr);
       info_ptr += 8;
       break;
+    case DW_FORM_ref_sig8:
+      attr->u.val = read_8_bytes (abfd, info_ptr);
+      info_ptr += 8;
+      break;
     case DW_FORM_ref_udata:
       attr->u.val = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
       info_ptr += bytes_read;



More information about the Binutils mailing list