Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2013 16:26:58 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r249058 - in stable/8/contrib/binutils: bfd binutils
Message-ID:  <201304031626.r33GQwL7093617@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Apr  3 16:26:58 2013
New Revision: 249058
URL: http://svnweb.freebsd.org/changeset/base/249058

Log:
  MFC r248802:
  
  Similar to r239870 and r239872, teach the other binutils tools about the
  DW_FORM_flag_present dwarf attribute, so they do not print errors or
  warnings on files that contain it.  (This attribute can be emitted by
  newer versions of clang and gcc.)

Modified:
  stable/8/contrib/binutils/bfd/dwarf2.c
  stable/8/contrib/binutils/binutils/readelf.c
Directory Properties:
  stable/8/contrib/binutils/   (props changed)

Modified: stable/8/contrib/binutils/bfd/dwarf2.c
==============================================================================
--- stable/8/contrib/binutils/bfd/dwarf2.c	Wed Apr  3 16:20:21 2013	(r249057)
+++ stable/8/contrib/binutils/bfd/dwarf2.c	Wed Apr  3 16:26:58 2013	(r249058)
@@ -617,6 +617,9 @@ read_attribute_value (struct attribute *
       attr->u.val = read_1_byte (abfd, info_ptr);
       info_ptr += 1;
       break;
+    case DW_FORM_flag_present:
+      attr->u.val = 1;
+      break;
     case DW_FORM_sdata:
       attr->u.sval = read_signed_leb128 (abfd, info_ptr, &bytes_read);
       info_ptr += bytes_read;

Modified: stable/8/contrib/binutils/binutils/readelf.c
==============================================================================
--- stable/8/contrib/binutils/binutils/readelf.c	Wed Apr  3 16:20:21 2013	(r249057)
+++ stable/8/contrib/binutils/binutils/readelf.c	Wed Apr  3 16:26:58 2013	(r249058)
@@ -6997,6 +6997,7 @@ get_FORM_name (unsigned long form)
     case DW_FORM_ref8:		return "DW_FORM_ref8";
     case DW_FORM_ref_udata:	return "DW_FORM_ref_udata";
     case DW_FORM_indirect:	return "DW_FORM_indirect";
+    case DW_FORM_flag_present:	return "DW_FORM_flag_present";
     default:
       {
 	static char buffer[100];
@@ -7888,6 +7889,10 @@ read_and_display_attr_value (unsigned lo
       data += offset_size;
       break;
 
+    case DW_FORM_flag_present:
+      uvalue = 1;
+      break;
+
     case DW_FORM_ref1:
     case DW_FORM_flag:
     case DW_FORM_data1:
@@ -7943,6 +7948,7 @@ read_and_display_attr_value (unsigned lo
       printf (" %#lx", uvalue);
       break;
 
+    case DW_FORM_flag_present:
     case DW_FORM_flag:
     case DW_FORM_data1:
     case DW_FORM_data2:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304031626.r33GQwL7093617>