summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-03-27 19:21:36 +0000
committerdim <dim@FreeBSD.org>2013-03-27 19:21:36 +0000
commit0e6638027ddc49e54fd6a31fb4629766a5992959 (patch)
treeb7c708a38efb93de529c70daa1de6577cec01053 /contrib/binutils
parent368b37ab92dbf3f56220cdfe92137b7edec63552 (diff)
downloadFreeBSD-src-0e6638027ddc49e54fd6a31fb4629766a5992959.zip
FreeBSD-src-0e6638027ddc49e54fd6a31fb4629766a5992959.tar.gz
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.) MFC after: 1 week
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/bfd/dwarf2.c3
-rw-r--r--contrib/binutils/binutils/dwarf.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c
index 411a715..6554f0f 100644
--- a/contrib/binutils/bfd/dwarf2.c
+++ b/contrib/binutils/bfd/dwarf2.c
@@ -633,6 +633,9 @@ read_attribute_value (struct attribute *attr,
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;
diff --git a/contrib/binutils/binutils/dwarf.c b/contrib/binutils/binutils/dwarf.c
index cc37b25b..a11a0ec 100644
--- a/contrib/binutils/binutils/dwarf.c
+++ b/contrib/binutils/binutils/dwarf.c
@@ -557,6 +557,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];
@@ -969,6 +970,10 @@ read_and_display_attr_value (unsigned long attribute,
data += offset_size;
break;
+ case DW_FORM_flag_present:
+ uvalue = 1;
+ break;
+
case DW_FORM_ref1:
case DW_FORM_flag:
case DW_FORM_data1:
@@ -1030,6 +1035,7 @@ read_and_display_attr_value (unsigned long attribute,
printf (" %#lx", uvalue);
break;
+ case DW_FORM_flag_present:
case DW_FORM_flag:
case DW_FORM_data1:
case DW_FORM_data2:
OpenPOWER on IntegriCloud