x86: Treat relocation against IFUNC symbol as FUNC
[deliverable/binutils-gdb.git] / bfd / elf32-msp430.c
index 1f334c44d5c6eb6372a7a67deaf35d7cb2514701..2d351d3906cc5f985d43d9b6766ae2b2ab100b90 100644 (file)
@@ -631,7 +631,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 
 /* Set the howto pointer for an MSP430 ELF reloc.  */
 
-static void
+static bfd_boolean
 msp430_info_to_howto_rela (bfd * abfd,
                           arelent * cache_ptr,
                           Elf_Internal_Rela * dst)
@@ -647,20 +647,23 @@ msp430_info_to_howto_rela (bfd * abfd,
          /* xgettext:c-format */
          _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                              abfd, r_type);
-         r_type = 0;
+         bfd_set_error (bfd_error_bad_value);
+         return FALSE;
        }
       cache_ptr->howto = elf_msp430x_howto_table + r_type;
-      return;
     }
-
-  if (r_type >= (unsigned int) R_MSP430_max)
+  else if (r_type >= (unsigned int) R_MSP430_max)
     {
       /* xgettext:c-format */
       _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                          abfd, r_type);
-      r_type = 0;
+      bfd_set_error (bfd_error_bad_value);
+      return FALSE;
     }
-  cache_ptr->howto = &elf_msp430_howto_table[r_type];
+  else
+    cache_ptr->howto = &elf_msp430_howto_table[r_type];
+
+  return TRUE;
 }
 
 /* Look through the relocs for a section during the first phase.
@@ -831,7 +834,7 @@ msp430_final_link_relocate (reloc_howto_type *         howto,
                  {
                    info->callbacks->warning
                      (info,
-                      _("Try enabling relaxation to avoid relocation truncations"),
+                      _("try enabling relaxation to avoid relocation truncations"),
                       NULL, input_bfd, input_section, relocation);
                    warned = TRUE;
                  }
@@ -1145,7 +1148,7 @@ msp430_final_link_relocate (reloc_howto_type *       howto,
                {
                  info->callbacks->warning
                    (info,
-                    _("Try enabling relaxation to avoid relocation truncations"),
+                    _("try enabling relaxation to avoid relocation truncations"),
                     NULL, input_bfd, input_section, relocation);
                  warned = TRUE;
                }
@@ -2351,7 +2354,7 @@ elf32_msp430_obj_attrs_handle_unknown (bfd *abfd, int tag)
 {
   _bfd_error_handler
     /* xgettext:c-format */
-    (_("Warning: %pB: Unknown MSPABI object attribute %d"),
+    (_("warning: %pB: unknown MSPABI object attribute %d"),
      abfd, tag);
   return TRUE;
 }
This page took 0.023833 seconds and 4 git commands to generate.