Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf32-msp430.c
index d2185280ed9569914b60260ad376b4dfa04c77bf..e1e6ed0ee5734f37904f4c14790ec5b12bf371ab 100644 (file)
@@ -1,5 +1,5 @@
 /*  MSP430-specific support for 32-bit ELF
-    Copyright (C) 2002-2016 Free Software Foundation, Inc.
+    Copyright (C) 2002-2017 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;
     }
@@ -696,7 +698,7 @@ elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info,
 
          /* PR15323, ref flags aren't set for references in the same
             object.  */
-         h->root.non_ir_ref = 1;
+         h->root.non_ir_ref_regular = 1;
        }
     }
 
@@ -2225,8 +2227,10 @@ msp430_elf_relax_section (bfd * abfd, asection * sec,
 
        /* Try to turn a 16-bit absolute branch into a 10-bit pc-relative
           branch.  */
-       if (uses_msp430x_relocs (abfd)
-           && ELF32_R_TYPE (irel->r_info) == R_MSP430X_ABS16)
+       if ((uses_msp430x_relocs (abfd)
+            && ELF32_R_TYPE (irel->r_info) == R_MSP430X_ABS16)
+           || (! uses_msp430x_relocs (abfd)
+               && ELF32_R_TYPE (irel->r_info) == R_MSP430_16))
          {
            bfd_vma value = symval;
 
@@ -2348,6 +2352,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;
@@ -2440,10 +2445,10 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
   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),
-        isa_type (out_attr[OFBA_MSPABI_Tag_ISA].i));
+        ibfd, isa_type (in_attr[OFBA_MSPABI_Tag_ISA].i),
+        first_input_bfd, isa_type (out_attr[OFBA_MSPABI_Tag_ISA].i));
       result = FALSE;
     }
 
@@ -2452,10 +2457,10 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
       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),
-        code_model (out_attr[OFBA_MSPABI_Tag_Code_Model].i));
+        ibfd, code_model (in_attr[OFBA_MSPABI_Tag_Code_Model].i),
+        first_input_bfd, code_model (out_attr[OFBA_MSPABI_Tag_Code_Model].i));
       result = FALSE;
     }
 
@@ -2464,6 +2469,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
       && 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;
@@ -2474,10 +2480,10 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
       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),
-        data_model (out_attr[OFBA_MSPABI_Tag_Data_Model].i));
+        ibfd, data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i),
+        first_input_bfd, data_model (out_attr[OFBA_MSPABI_Tag_Data_Model].i));
       result = FALSE;
     }
 
@@ -2486,6 +2492,7 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
       && 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));
@@ -2497,9 +2504,10 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
       && 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));
+        ibfd, data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i),
+        first_input_bfd);
       result = FALSE;
     }
 
@@ -2546,7 +2554,8 @@ uses_large_model (bfd *abfd)
 }
 
 static unsigned int
-elf32_msp430_eh_frame_address_size (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
+elf32_msp430_eh_frame_address_size (bfd *abfd,
+                                   const asection *sec ATTRIBUTE_UNUSED)
 {
   return uses_large_model (abfd) ? 4 : 2;
 }
This page took 0.02576 seconds and 4 git commands to generate.