PowerPC fix for ifunc broken by d1eca1e4
[deliverable/binutils-gdb.git] / bfd / elf32-i960.c
index f458320655b4fd092dda902d405be9239cf984d7..c6fbbb8c493eaf09330b524f9de3b52d4a87dba2 100644 (file)
@@ -1,11 +1,11 @@
 /* Intel 960 specific support for 32-bit ELF
 /* Intel 960 specific support for 32-bit ELF
-   Copyright 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -18,8 +18,8 @@
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
-#include "bfd.h"
 #include "sysdep.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/i960.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/i960.h"
@@ -27,6 +27,8 @@
 #define USE_REL 1
 
 #define bfd_elf32_bfd_reloc_type_lookup        elf32_i960_reloc_type_lookup
 #define USE_REL 1
 
 #define bfd_elf32_bfd_reloc_type_lookup        elf32_i960_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup \
+  elf32_i960_reloc_name_lookup
 #define elf_info_to_howto              elf32_i960_info_to_howto
 #define elf_info_to_howto_rel          elf32_i960_info_to_howto_rel
 
 #define elf_info_to_howto              elf32_i960_info_to_howto
 #define elf_info_to_howto_rel          elf32_i960_info_to_howto_rel
 
@@ -44,7 +46,7 @@ static bfd_reloc_status_type
 elf32_i960_relocate (bfd *abfd ATTRIBUTE_UNUSED,
                     arelent *reloc_entry,
                     asymbol *symbol,
 elf32_i960_relocate (bfd *abfd ATTRIBUTE_UNUSED,
                     arelent *reloc_entry,
                     asymbol *symbol,
-                    PTR data ATTRIBUTE_UNUSED,
+                    void * data ATTRIBUTE_UNUSED,
                     asection *input_section,
                     bfd *output_bfd,
                     char **error_message ATTRIBUTE_UNUSED)
                     asection *input_section,
                     bfd *output_bfd,
                     char **error_message ATTRIBUTE_UNUSED)
@@ -142,7 +144,21 @@ elf32_i960_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
   return elf_howto_table + elf32_i960_bfd_to_reloc_type (code);
 }
 
   return elf_howto_table + elf32_i960_bfd_to_reloc_type (code);
 }
 
-#define TARGET_LITTLE_SYM      bfd_elf32_i960_vec
+static reloc_howto_type *
+elf32_i960_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                             const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0; i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]); i++)
+    if (elf_howto_table[i].name != NULL
+       && strcasecmp (elf_howto_table[i].name, r_name) == 0)
+      return &elf_howto_table[i];
+
+  return NULL;
+}
+
+#define TARGET_LITTLE_SYM      i960_elf32_vec
 #define TARGET_LITTLE_NAME     "elf32-i960"
 #define ELF_ARCH               bfd_arch_i960
 #define ELF_MACHINE_CODE       EM_960
 #define TARGET_LITTLE_NAME     "elf32-i960"
 #define ELF_ARCH               bfd_arch_i960
 #define ELF_MACHINE_CODE       EM_960
This page took 0.026675 seconds and 4 git commands to generate.