X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Faout-tic30.c;h=49815c4fdfb47f1413d0d9ca50f830a0371680f4;hb=d57a3c85f6eee87b04852e98cce75af080969951;hp=0feb99decb16f45c3a0a6253ea6bc52836e972f0;hpb=4ab527b0538fcb65673a93dc775c39a2e7ccb6d7;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c index 0feb99decb..49815c4fdf 100644 --- a/bfd/aout-tic30.c +++ b/bfd/aout-tic30.c @@ -1,5 +1,5 @@ /* BFD back-end for TMS320C30 a.out binaries. - Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) @@ -7,7 +7,7 @@ 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, @@ -35,8 +35,8 @@ #define TARGETNAME "a.out-tic30" #define NAME(x,y) CONCAT3 (tic30_aout,_32_,y) -#include "bfd.h" #include "sysdep.h" +#include "bfd.h" #include "libaout.h" #include "aout/aout64.h" #include "aout/stab_gnu.h" @@ -270,6 +270,23 @@ tic30_aout_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, } } +static reloc_howto_type * +tic30_aout_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, + const char *r_name) +{ + unsigned int i; + + for (i = 0; + i < (sizeof (tic30_aout_howto_table) + / sizeof (tic30_aout_howto_table[0])); + i++) + if (tic30_aout_howto_table[i].name != NULL + && strcasecmp (tic30_aout_howto_table[i].name, r_name) == 0) + return &tic30_aout_howto_table[i]; + + return NULL; +} + static reloc_howto_type * tic30_aout_reloc_howto (bfd *abfd, struct reloc_std_external *relocs, @@ -936,6 +953,9 @@ tic30_aout_set_arch_mach (bfd *abfd, #ifndef MY_bfd_reloc_type_lookup #define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup #endif +#ifndef MY_bfd_reloc_name_lookup +#define MY_bfd_reloc_name_lookup tic30_aout_reloc_name_lookup +#endif #ifndef MY_bfd_make_debug_symbol #define MY_bfd_make_debug_symbol 0 #endif