Attribute with DW_FORM_flag_present
authorAlan Modra <amodra@gmail.com>
Tue, 22 Mar 2016 12:20:18 +0000 (22:50 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 22 Mar 2016 12:20:18 +0000 (22:50 +1030)
PR 19850
* dwarf2.c (read_attribute_value): Skip info_ptr check for
DW_FORM_flag_present.

bfd/ChangeLog
bfd/dwarf2.c

index 8397f8c184d2ad6fea4213b5d48fa06d32f62b5b..b57cfa550067fd4aa8a1cf9d9e660433ea3829f9 100644 (file)
@@ -1,3 +1,9 @@
+2016-03-22  Alan Modra  <amodra@gmail.com>
+
+       PR 19850
+       * dwarf2.c (read_attribute_value): Skip info_ptr check for
+       DW_FORM_flag_present.
+
 2016-03-22  Nick Clifton  <nickc@redhat.com>
 
        * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
index 4d6f8fcae19b0ce33aa6230e7bff7bcea0a46a58..addfbf51edcc7d54acf3381593c59b8b9afebcb3 100644 (file)
@@ -1003,7 +1003,7 @@ read_attribute_value (struct attribute *  attr,
   struct dwarf_block *blk;
   bfd_size_type amt;
 
-  if (info_ptr >= info_ptr_end)
+  if (info_ptr >= info_ptr_end && form != DW_FORM_flag_present)
     {
       (*_bfd_error_handler) (_("Dwarf Error: Info pointer extends beyond end of attributes"));
       bfd_set_error (bfd_error_bad_value);