Prevent overflowing the selected_cpu_name buffer in the ARM assembler.
[deliverable/binutils-gdb.git] / bfd / elf32-mep.c
index d94c13c2ce7ced23b26d9f5e5be566cca4abbc63..6c41519eca04962b2b96ae91bf2de67db554206d 100644 (file)
 /* Private relocation functions.  */
 \f
 #define MEPREL(type, size, bits, right, left, pcrel, overflow, mask) \
-  {(unsigned)type, right, size, bits, pcrel, left, overflow, mep_reloc, #type, FALSE, 0, mask, 0 }
+  {(unsigned)type, right, size, bits, pcrel, left, overflow, bfd_elf_generic_reloc, #type, FALSE, 0, mask, 0 }
 
 #define N complain_overflow_dont
 #define S complain_overflow_signed
 #define U complain_overflow_unsigned
 
-static bfd_reloc_status_type mep_reloc (bfd *, arelent *, struct bfd_symbol *,
-                                       void *, asection *, bfd *, char **);
-
 static reloc_howto_type mep_elf_howto_table [] =
 {
   /* type, size, bits, leftshift, rightshift, pcrel, OD/OS/OU, mask.  */
@@ -75,20 +72,6 @@ static reloc_howto_type mep_elf_howto_table [] =
 #undef N
 #undef S
 #undef U
-
-static bfd_reloc_status_type
-mep_reloc
-    (bfd *               abfd ATTRIBUTE_UNUSED,
-     arelent *           reloc_entry ATTRIBUTE_UNUSED,
-     struct bfd_symbol * symbol ATTRIBUTE_UNUSED,
-     void *              data ATTRIBUTE_UNUSED,
-     asection *          input_section ATTRIBUTE_UNUSED,
-     bfd *               output_bfd ATTRIBUTE_UNUSED,
-     char **             error_message ATTRIBUTE_UNUSED)
-{
-  return bfd_reloc_ok;
-}
-
 \f
 
 #define BFD_RELOC_MEP_NONE BFD_RELOC_NONE
@@ -402,7 +385,7 @@ mep_info_to_howto_rela
   r_type = ELF32_R_TYPE (dst->r_info);
   if (r_type >= R_MEP_max)
     {
-      _bfd_error_handler (_("%A: invalid MEP reloc number: %d"), abfd, r_type);
+      _bfd_error_handler (_("%B: invalid MEP reloc number: %d"), abfd, r_type);
       r_type = 0;
     }
   cache_ptr->howto = & mep_elf_howto_table [r_type];
@@ -508,7 +491,7 @@ mep_elf_relocate_section
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, 1, relend, howto, 0, contents);
 
-      if (info->relocatable)
+      if (bfd_link_relocatable (info))
        continue;
 
       if (r_type == R_RELC)
This page took 0.023856 seconds and 4 git commands to generate.