bfd: Rename read_{signed,unsigned}_leb128, safe_read_leb128
[deliverable/binutils-gdb.git] / bfd / elf-attrs.c
index 919c3eff1f41b77bf5dc370ea93a8e6c2bb146fd..def1345eeb00396decdca83cf56b40e19736e379 100644 (file)
@@ -1,5 +1,5 @@
 /* ELF attributes support (based on ARM EABI attributes).
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -493,7 +493,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
              bfd_vma subsection_len;
              bfd_byte *end;
 
-             tag = safe_read_leb128 (abfd, p, &n, FALSE, p_end);
+             tag = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, p_end);
              p += n;
              if (p < p_end - 4)
                subsection_len = bfd_get_32 (abfd, p);
@@ -517,13 +517,13 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
                    {
                      int type;
 
-                     tag = safe_read_leb128 (abfd, p, &n, FALSE, end);
+                     tag = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end);
                      p += n;
                      type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag);
                      switch (type & (ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL))
                        {
                        case ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL:
-                         val = safe_read_leb128 (abfd, p, &n, FALSE, end);
+                         val = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end);
                          p += n;
                          bfd_elf_add_obj_attr_int_string (abfd, vendor, tag,
                                                           val, (char *) p);
@@ -535,7 +535,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
                          p += strlen ((char *)p) + 1;
                          break;
                        case ATTR_TYPE_FLAG_INT_VAL:
-                         val = safe_read_leb128 (abfd, p, &n, FALSE, end);
+                         val = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end);
                          p += n;
                          bfd_elf_add_obj_attr_int (abfd, vendor, tag, val);
                          break;
@@ -571,8 +571,9 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
    attributes.  */
 
 bfd_boolean
-_bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd)
+_bfd_elf_merge_object_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr;
   obj_attribute *out_attr;
   int vendor;
@@ -590,6 +591,7 @@ _bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd)
       if (in_attr->i > 0 && strcmp (in_attr->s, "gnu") != 0)
        {
          _bfd_error_handler
+           /* xgettext:c-format */
                (_("error: %B: Object has vendor-specific contents that "
                   "must be processed by the '%s' toolchain"),
                 ibfd, in_attr->s);
@@ -599,6 +601,7 @@ _bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd)
       if (in_attr->i != out_attr->i
          || (in_attr->i != 0 && strcmp (in_attr->s, out_attr->s) != 0))
        {
+         /* xgettext:c-format */
          _bfd_error_handler (_("error: %B: Object tag '%d, %s' is "
                                "incompatible with tag '%d, %s'"),
                              ibfd,
This page took 0.040681 seconds and 4 git commands to generate.