gdb/doc: Clarify vCont packet description
[binutils-gdb.git] / bfd / elf32-msp430.c
index 8e87b67e4f5d70df6b7342d75f2214c6f77b97ed..33895f625554175b435047cf6453aa2f4c278552 100644 (file)
@@ -1,5 +1,5 @@
 /*  MSP430-specific support for 32-bit ELF
-    Copyright (C) 2002-2015 Free Software Foundation, Inc.
+    Copyright (C) 2002-2016 Free Software Foundation, Inc.
     Contributed by Dmitry Diky <diwil@mail.ru>
 
     This file is part of BFD, the Binary File Descriptor library.
@@ -644,6 +644,7 @@ msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
     {
       if (r_type >= (unsigned int) R_MSP430x_max)
        {
+         /* xgettext:c-format */
          _bfd_error_handler (_("%B: invalid MSP430X reloc number: %d"), abfd, r_type);
          r_type = 0;
        }
@@ -653,6 +654,7 @@ msp430_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED,
 
   if (r_type >= (unsigned int) R_MSP430_max)
     {
+      /* xgettext:c-format */
       _bfd_error_handler (_("%B: invalid MSP430 reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
@@ -1341,15 +1343,14 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
          switch (r)
            {
            case bfd_reloc_overflow:
-             r = info->callbacks->reloc_overflow
+             (*info->callbacks->reloc_overflow)
                (info, (h ? &h->root : NULL), name, howto->name,
-                  (bfd_vma) 0, input_bfd, input_section,
-                  rel->r_offset);
+                (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
              break;
 
            case bfd_reloc_undefined:
-             r = info->callbacks->undefined_symbol
-                 (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+             (*info->callbacks->undefined_symbol)
+               (info, name, input_bfd, input_section, rel->r_offset, TRUE);
              break;
 
            case bfd_reloc_outofrange:
@@ -1370,11 +1371,8 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
            }
 
          if (msg)
-           r = info->callbacks->warning
-               (info, msg, name, input_bfd, input_section, rel->r_offset);
-
-         if (!r)
-           return FALSE;
+           (*info->callbacks->warning) (info, msg, name, input_bfd,
+                                        input_section, rel->r_offset);
        }
 
     }
@@ -2352,6 +2350,7 @@ static bfd_boolean
 elf32_msp430_obj_attrs_handle_unknown (bfd *abfd, int tag)
 {
   _bfd_error_handler
+    /* xgettext:c-format */
     (_("Warning: %B: Unknown MSPABI object attribute %d"),
      abfd, tag);
   return TRUE;
@@ -2410,8 +2409,9 @@ data_model (int model)
    Raise an error if there are conflicting attributes.  */
 
 static bfd_boolean
-elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
+elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   obj_attribute *in_attr;
   obj_attribute *out_attr;
   bfd_boolean result = TRUE;
@@ -2443,6 +2443,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
   if (in_attr[OFBA_MSPABI_Tag_ISA].i != out_attr[OFBA_MSPABI_Tag_ISA].i)
     {
       _bfd_error_handler
+       /* xgettext:c-format */
        (_("error: %B uses %s instructions but %B uses %s"),
         ibfd, first_input_bfd,
         isa_type (in_attr[OFBA_MSPABI_Tag_ISA].i),
@@ -2455,6 +2456,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
       out_attr[OFBA_MSPABI_Tag_Code_Model].i)
     {
       _bfd_error_handler
+       /* xgettext:c-format */
        (_("error: %B uses the %s code model whereas %B uses the %s code model"),
         ibfd, first_input_bfd,
         code_model (in_attr[OFBA_MSPABI_Tag_Code_Model].i),
@@ -2467,6 +2469,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
       && out_attr[OFBA_MSPABI_Tag_ISA].i != 2)
     {
       _bfd_error_handler
+       /* xgettext:c-format */
        (_("error: %B uses the large code model but %B uses MSP430 instructions"),
         ibfd, first_input_bfd);
       result = FALSE;
@@ -2477,6 +2480,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
       out_attr[OFBA_MSPABI_Tag_Data_Model].i)
     {
       _bfd_error_handler
+       /* xgettext:c-format */
        (_("error: %B uses the %s data model whereas %B uses the %s data model"),
         ibfd, first_input_bfd,
         data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i),
@@ -2489,6 +2493,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
       && out_attr[OFBA_MSPABI_Tag_Data_Model].i != 1)
     {
       _bfd_error_handler
+       /* xgettext:c-format */
        (_("error: %B uses the small code model but %B uses the %s data model"),
         ibfd, first_input_bfd,
         data_model (out_attr[OFBA_MSPABI_Tag_Data_Model].i));
@@ -2500,6 +2505,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
       && out_attr[OFBA_MSPABI_Tag_ISA].i != 2)
     {
       _bfd_error_handler
+       /* xgettext:c-format */
        (_("error: %B uses the %s data model but %B only uses MSP430 instructions"),
         ibfd, first_input_bfd,
         data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i));
@@ -2513,8 +2519,9 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, bfd *obfd)
    object file when linking.  */
 
 static bfd_boolean
-elf32_msp430_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+elf32_msp430_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   /* Make sure that the machine number reflects the most
      advanced version of the MSP architecture required.  */
 #define max(a,b) ((a) > (b) ? (a) : (b))
@@ -2523,7 +2530,7 @@ elf32_msp430_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
                               max (bfd_get_mach (ibfd), bfd_get_mach (obfd)));
 #undef max
 
-  return elf32_msp430_merge_mspabi_attributes (ibfd, obfd);
+  return elf32_msp430_merge_mspabi_attributes (ibfd, info);
 }
 
 static bfd_boolean
@@ -2629,4 +2636,7 @@ static const struct bfd_elf_special_section msp430_ti_elf_special_sections[] =
   { NULL, 0,                                0, 0,                      0 }
 };
 
+#undef  elf_backend_special_sections
+#define elf_backend_special_sections           msp430_ti_elf_special_sections
+
 #include "elf32-target.h"