diff options
author | Nick Clifton <nickc@redhat.com> | 1998-11-17 23:30:56 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1998-11-17 23:30:56 +0000 |
commit | 82ef568c2e7ead6ebed8d963a8700f591177aacb (patch) | |
tree | cdb30b2212b2aa4fec53a815621666cfdcf0be66 | |
parent | 2ca484a7113afb242187adb48d11d6b212b7833e (diff) | |
download | gdb-82ef568c2e7ead6ebed8d963a8700f591177aacb.zip gdb-82ef568c2e7ead6ebed8d963a8700f591177aacb.tar.gz gdb-82ef568c2e7ead6ebed8d963a8700f591177aacb.tar.bz2 |
Fixed simple fr30 reloc handling.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-fr30.c | 28 |
2 files changed, 22 insertions, 11 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 107865f..bad8000 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 17 15:28:31 1998 Nick Clifton <nickc@cygnus.com> + + * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold + reloc number. + Mon Nov 16 22:19:21 1998 DJ Delorie <dj@cygnus.com> * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c index 52df526..387789c 100644 --- a/bfd/elf32-fr30.c +++ b/bfd/elf32-fr30.c @@ -26,6 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Forward declarations. */ static bfd_reloc_status_type fr30_elf_i20_reloc PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); +static reloc_howto_type * fr30_reloc_type_lookup + PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); +static void fr30_info_to_howto_rela + PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *)); +static boolean fr30_elf_relocate_section + PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); static reloc_howto_type fr30_elf_howto_table [] = { @@ -231,8 +237,8 @@ fr30_elf_i20_reloc (abfd, reloc_entry, symbol, data, struct fr30_reloc_map { - unsigned char bfd_reloc_val; - unsigned char elf_reloc_val; + unsigned int bfd_reloc_val; + unsigned int fr30_reloc_val; }; static const struct fr30_reloc_map fr30_reloc_map [] = @@ -250,7 +256,7 @@ static const struct fr30_reloc_map fr30_reloc_map [] = }; static reloc_howto_type * -bfd_elf32_bfd_reloc_type_lookup (abfd, code) +fr30_reloc_type_lookup (abfd, code) bfd * abfd; bfd_reloc_code_real_type code; { @@ -258,18 +264,16 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code) for (i = sizeof (fr30_reloc_map) / sizeof (fr30_reloc_map[0]); --i;) - { - if (fr30_reloc_map [i].bfd_reloc_val == code) - return & fr30_elf_howto_table [fr30_reloc_map[i].elf_reloc_val]; - } - + if (fr30_reloc_map [i].bfd_reloc_val == code) + return & fr30_elf_howto_table [fr30_reloc_map[i].fr30_reloc_val]; + return NULL; } /* Set the howto pointer for an FR30 ELF reloc. */ static void -fr30_info_to_howto_rel (abfd, cache_ptr, dst) +fr30_info_to_howto_rela (abfd, cache_ptr, dst) bfd * abfd; arelent * cache_ptr; Elf32_Internal_Rela * dst; @@ -509,8 +513,10 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section, #define TARGET_BIG_SYM bfd_elf32_fr30_vec #define TARGET_BIG_NAME "elf32-fr30" -#define elf_info_to_howto 0 -#define elf_info_to_howto_rel fr30_info_to_howto_rel +#define elf_info_to_howto_rel NULL +#define elf_info_to_howto fr30_info_to_howto_rela #define elf_backend_relocate_section fr30_elf_relocate_section + +#define bfd_elf32_bfd_reloc_type_lookup fr30_reloc_type_lookup #include "elf32-target.h" |