]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/coff-i386.c
* aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
[thirdparty/binutils-gdb.git] / bfd / coff-i386.c
index 0d71cd0006578e4b6c71ed035bbf8116ce11a9fa..a3b5116a3c15d4df3411dd5a9bdef5af6664680f 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel 386 COFF files.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004
+   2000, 2001, 2002, 2003, 2004, 2007
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -546,6 +546,7 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
 }
 
 #define coff_bfd_reloc_type_lookup coff_i386_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup coff_i386_reloc_name_lookup
 
 static reloc_howto_type *
 coff_i386_reloc_type_lookup (abfd, code)
@@ -578,6 +579,20 @@ coff_i386_reloc_type_lookup (abfd, code)
     }
 }
 
+static reloc_howto_type *
+coff_i386_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+                            const char *r_name)
+{
+  unsigned int i;
+
+  for (i = 0; i < sizeof (howto_table) / sizeof (howto_table[0]); i++)
+    if (howto_table[i].name != NULL
+       && strcasecmp (howto_table[i].name, r_name) == 0)
+      return &howto_table[i];
+
+  return NULL;
+}
+
 #define coff_rtype_to_howto coff_i386_rtype_to_howto
 
 #ifdef TARGET_UNDERSCORE