From b3cded65e92ba4d9b5e5a33fb95c4d551bda9c1b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 30 Oct 2010 23:02:32 +0000 Subject: Import the binutils master branch from the sourceware CVS repository, exactly as it was on Tue, 3 Jul 2007 07:54:19 +0000. Corresponds to git commit 397a64b350470350c8e0adb2af84439ea0f89272, which was the last commit before switching to GPLv3. --- bfd/elf32-i960.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'bfd/elf32-i960.c') diff --git a/bfd/elf32-i960.c b/bfd/elf32-i960.c index f458320655b4f..10e6e55aa872f 100644 --- a/bfd/elf32-i960.c +++ b/bfd/elf32-i960.c @@ -1,5 +1,6 @@ /* Intel 960 specific support for 32-bit ELF - Copyright 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2007 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -18,8 +19,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "bfd.h" #include "sysdep.h" +#include "bfd.h" #include "libbfd.h" #include "elf-bfd.h" #include "elf/i960.h" @@ -27,6 +28,8 @@ #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 @@ -142,6 +145,20 @@ elf32_i960_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, return elf_howto_table + elf32_i960_bfd_to_reloc_type (code); } +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 bfd_elf32_i960_vec #define TARGET_LITTLE_NAME "elf32-i960" #define ELF_ARCH bfd_arch_i960 -- cgit v1.2.3