diff options
author | Jeff Law <law@redhat.com> | 1996-10-03 16:42:22 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-10-03 16:42:22 +0000 |
commit | ae1b99e42dbce238cd7eb5efd38672b8306f1148 (patch) | |
tree | 62cc3acea6d14f13f329d7ea5e4813255f126d27 /bfd | |
parent | feede9b69925572e68d3859b2fcb610bddd2e713 (diff) | |
download | gdb-ae1b99e42dbce238cd7eb5efd38672b8306f1148.zip gdb-ae1b99e42dbce238cd7eb5efd38672b8306f1148.tar.gz gdb-ae1b99e42dbce238cd7eb5efd38672b8306f1148.tar.bz2 |
Grrr. The mn10200 and mn10300 are _not_ similar enough to easily support
with a single generic configuration. So break them up into two different
configurations. See the individual ChangeLogs for additional detail.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/.Sanitize | 6 | ||||
-rw-r--r-- | bfd/ChangeLog | 10 | ||||
-rw-r--r-- | bfd/Makefile.in | 12 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 3 | ||||
-rwxr-xr-x | bfd/config.bfd | 8 | ||||
-rwxr-xr-x | bfd/configure | 3 | ||||
-rw-r--r-- | bfd/configure.in | 3 | ||||
-rw-r--r--[-rwxr-xr-x] | bfd/cpu-mn10200.c (renamed from bfd/cpu-mn10x00.c) | 22 | ||||
-rw-r--r-- | bfd/cpu-mn10300.c | 38 | ||||
-rw-r--r-- | bfd/elf32-mn10200.c (renamed from bfd/elf32-mn10x00.c) | 44 | ||||
-rw-r--r-- | bfd/elf32-mn10300.c | 111 | ||||
-rw-r--r-- | bfd/targets.c | 6 |
12 files changed, 213 insertions, 53 deletions
diff --git a/bfd/.Sanitize b/bfd/.Sanitize index 4186890..14662f1 100644 --- a/bfd/.Sanitize +++ b/bfd/.Sanitize @@ -137,7 +137,8 @@ cpu-i960.c cpu-m68k.c cpu-m88k.c cpu-mips.c -cpu-mn10x00.c +cpu-mn10200.c +cpu-mn10300.c cpu-ns32k.c cpu-powerpc.c cpu-rs6000.c @@ -163,7 +164,8 @@ elf32-i860.c elf32-m68k.c elf32-m88k.c elf32-mips.c -elf32-mn10x00.c +elf32-mn10200.c +elf32-mn10300.c elf32-ppc.c elf32-sh.c elf32-sparc.c diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ce0335c..6b76ef4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com) + + * cpu-mn10x00.c, elf32-mn10x00: Removed. + * cpu-mn10200.c, cpu-mn10300.c: New files. + * elf32-mn10200.c, elf32-mn10300.c: New files. + * Makefile.in: Break mn10x00 support into two separate + configurations, mn10200 and mn10300. + * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise. + * bfd-in2.h, configure: Rebuilt. + Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) * Makefile.in (do_clean): Move config.log to do_distclean. diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 4d4b96d..5cbc436 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -131,7 +131,8 @@ ALL_MACHINES = \ cpu-m68k.o \ cpu-m88k.o \ cpu-mips.o \ - cpu-mn10x00.o \ + cpu-mn10200.o \ + cpu-mn10300.o \ cpu-ns32k.o \ cpu-powerpc.o \ cpu-rs6000.o \ @@ -219,7 +220,8 @@ BFD32_BACKENDS = \ elf32-m68k.o \ elf32-m88k.o \ elf32-mips.o \ - elf32-mn10x00.o \ + elf32-mn10200.o \ + elf32-mn10300.o \ elf32-ppc.o \ elf32-sh.o \ elf32-sparc.o \ @@ -827,7 +829,11 @@ elf32-m32r.o: elf32-m32r.c elf-bfd.h $(INCDIR)/elf/common.h \ elf32-target.h end-sanitize-m32r: -elf32-mn10x00.o: elf32-mn10x00.c elf-bfd.h $(INCDIR)/elf/common.h \ +elf32-mn10200.o: elf32-mn10200.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + elf32-target.h + +elf32-mn10300.o: elf32-mn10300.c elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-target.h diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 67dbcb9..252931d 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1229,7 +1229,8 @@ enum bfd_architecture /* start-sanitize-m32r */ bfd_arch_m32r, /* Mitsubishi M32R */ /* end-sanitize-m32r */ - bfd_arch_mn10x00, /* Matsushita MN10x00 */ + bfd_arch_mn10200, /* Matsushita MN10200 */ + bfd_arch_mn10300, /* Matsushita MN10300 */ bfd_arch_last }; diff --git a/bfd/config.bfd b/bfd/config.bfd index a780aca..7c9b4ee 100755 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -393,8 +393,12 @@ case "${targ}" in targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec" ;; - mn10x00-*-*) - targ_defvec=bfd_elf32_mn10x00_vec + mn10200-*-*) + targ_defvec=bfd_elf32_mn10200_vec + ;; + + mn10300-*-*) + targ_defvec=bfd_elf32_mn10300_vec ;; ns32k-pc532-mach* | ns32k-pc532-ux*) diff --git a/bfd/configure b/bfd/configure index 51a0fc8..d655f1a 100755 --- a/bfd/configure +++ b/bfd/configure @@ -1928,7 +1928,8 @@ do # end-sanitize-m32r bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;; bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;; - bfd_elf32_mn10x00_vec) tb="$tb elf32-mn10x00.o elf32.o $elf" ;; + bfd_elf32_mn10200_vec) tb="$tb elf32-mn10200.o elf32.o $elf" ;; + bfd_elf32_mn10300_vec) tb="$tb elf32-mn10300.o elf32.o $elf" ;; bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; bfd_elf32_sh_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;; diff --git a/bfd/configure.in b/bfd/configure.in index 8b88d41..467db82 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -456,7 +456,8 @@ do # end-sanitize-m32r bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;; bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;; - bfd_elf32_mn10x00_vec) tb="$tb elf32-mn10x00.o elf32.o $elf" ;; + bfd_elf32_mn10200_vec) tb="$tb elf32-mn10200.o elf32.o $elf" ;; + bfd_elf32_mn10300_vec) tb="$tb elf32-mn10300.o elf32.o $elf" ;; bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;; bfd_elf32_sh_vec) tb="$tb elf32-sh.o elf32.o $elf coff-sh.o" ;; diff --git a/bfd/cpu-mn10x00.c b/bfd/cpu-mn10200.c index b8f1c56..2a0a988 100755..100644 --- a/bfd/cpu-mn10x00.c +++ b/bfd/cpu-mn10200.c @@ -1,4 +1,4 @@ -/* BFD support for the Matsushita 10200 and 10300 processors +/* BFD support for the Matsushita 10200 processor Copyright 1996 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -26,9 +26,9 @@ const bfd_arch_info_type bfd_mn10200_arch = 16, /* 16 bits in a word */ 24, /* 16 bits in an address */ 8, /* 8 bits in a byte */ - bfd_arch_mn10x00, + bfd_arch_mn10200, 200, - "mn10x00", + "mn10200", "mn10200", 2, true, /* the one and only */ @@ -36,19 +36,3 @@ const bfd_arch_info_type bfd_mn10200_arch = bfd_default_scan , 0, }; - -const bfd_arch_info_type bfd_mn10x00_arch = - { - 16, - 24, - 8, - bfd_arch_mn10x00, - 300, - "mn10x00", - "mn10300", - 2, - false, - bfd_default_compatible, - bfd_default_scan, - &bfd_mn10200_arch - }; diff --git a/bfd/cpu-mn10300.c b/bfd/cpu-mn10300.c new file mode 100644 index 0000000..fc6108d --- /dev/null +++ b/bfd/cpu-mn10300.c @@ -0,0 +1,38 @@ +/* BFD support for the Matsushita 10300 processor + Copyright 1996 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 +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + +const bfd_arch_info_type bfd_mn10300_arch = + { + 32, /* 16 bits in a word */ + 32, /* 16 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_mn10300, + 300, + "mn10300", + "mn10300", + 2, + true, /* the one and only */ + bfd_default_compatible, + bfd_default_scan , + 0, + }; diff --git a/bfd/elf32-mn10x00.c b/bfd/elf32-mn10200.c index 15fab94..88c3cbe 100644 --- a/bfd/elf32-mn10x00.c +++ b/bfd/elf32-mn10200.c @@ -1,5 +1,5 @@ -/* Matsushita 10200 and 10300 specific support for 32-bit ELF - Copyright (C) 1994, 1995 Free Software Foundation, Inc. +/* Matsushita 10200 specific support for 32-bit ELF + Copyright (C) 1996 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); -static void mn10x00_info_to_howto_rel +static void mn10200_info_to_howto_rel PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *)); /* Try to minimize the amount of space occupied by relocation tables @@ -33,14 +33,14 @@ static void mn10x00_info_to_howto_rel enum reloc_type { - R_MN10x00_NONE = 0, - R_MN10x00_MAX + R_MN10200_NONE = 0, + R_MN10200_MAX }; -static reloc_howto_type elf_mn10x00_howto_table[] = +static reloc_howto_type elf_mn10200_howto_table[] = { /* */ - HOWTO (R_MN10x00_NONE, + HOWTO (R_MN10200_NONE, 0, 2, 16, @@ -48,22 +48,22 @@ static reloc_howto_type elf_mn10x00_howto_table[] = 0, complain_overflow_bitfield, bfd_elf_generic_reloc, - "R_MN10x00_NONE", + "R_MN10200_NONE", false, 0, 0, false), }; -struct mn10x00_reloc_map +struct mn10200_reloc_map { unsigned char bfd_reloc_val; unsigned char elf_reloc_val; }; -static const struct mn10x00_reloc_map mn10x00_reloc_map[] = +static const struct mn10200_reloc_map mn10200_reloc_map[] = { - { BFD_RELOC_NONE, R_MN10x00_NONE, }, + { BFD_RELOC_NONE, R_MN10200_NONE, }, }; static reloc_howto_type * @@ -74,11 +74,11 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code) unsigned int i; for (i = 0; - i < sizeof (mn10x00_reloc_map) / sizeof (struct mn10x00_reloc_map); + i < sizeof (mn10200_reloc_map) / sizeof (struct mn10200_reloc_map); i++) { - if (mn10x00_reloc_map[i].bfd_reloc_val == code) - return &elf_mn10x00_howto_table[mn10x00_reloc_map[i].elf_reloc_val]; + if (mn10200_reloc_map[i].bfd_reloc_val == code) + return &elf_mn10200_howto_table[mn10200_reloc_map[i].elf_reloc_val]; } return NULL; @@ -87,7 +87,7 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code) /* Set the howto pointer for an V850 ELF reloc. */ static void -mn10x00_info_to_howto_rel (abfd, cache_ptr, dst) +mn10200_info_to_howto_rel (abfd, cache_ptr, dst) bfd *abfd; arelent *cache_ptr; Elf32_Internal_Rel *dst; @@ -95,17 +95,17 @@ mn10x00_info_to_howto_rel (abfd, cache_ptr, dst) unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) R_MN10x00_MAX); - cache_ptr->howto = &elf_mn10x00_howto_table[r_type]; + BFD_ASSERT (r_type < (unsigned int) R_MN10200_MAX); + cache_ptr->howto = &elf_mn10200_howto_table[r_type]; } -#define TARGET_LITTLE_SYM bfd_elf32_mn10x00_vec -#define TARGET_LITTLE_NAME "elf32-mn10x00" -#define ELF_ARCH bfd_arch_mn10x00 -#define ELF_MACHINE_CODE EM_CYGNUS_MN10x00 +#define TARGET_LITTLE_SYM bfd_elf32_mn10200_vec +#define TARGET_LITTLE_NAME "elf32-mn10200" +#define ELF_ARCH bfd_arch_mn10200 +#define ELF_MACHINE_CODE EM_CYGNUS_MN10200 #define ELF_MAXPAGESIZE 0x1000 #define elf_info_to_howto 0 -#define elf_info_to_howto_rel mn10x00_info_to_howto_rel +#define elf_info_to_howto_rel mn10200_info_to_howto_rel #include "elf32-target.h" diff --git a/bfd/elf32-mn10300.c b/bfd/elf32-mn10300.c new file mode 100644 index 0000000..309fa40 --- /dev/null +++ b/bfd/elf32-mn10300.c @@ -0,0 +1,111 @@ +/* Matsushita 10300 specific support for 32-bit ELF + Copyright (C) 1996 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 +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" +#include "elf-bfd.h" + +static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup + PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); +static void mn10300_info_to_howto_rel + PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *)); + +/* Try to minimize the amount of space occupied by relocation tables + on the ROM (not that the ROM won't be swamped by other ELF overhead). */ +#define USE_REL + +enum reloc_type +{ + R_MN10300_NONE = 0, + R_MN10300_MAX +}; + +static reloc_howto_type elf_mn10300_howto_table[] = +{ + /* */ + HOWTO (R_MN10300_NONE, + 0, + 2, + 16, + false, + 0, + complain_overflow_bitfield, + bfd_elf_generic_reloc, + "R_MN10300_NONE", + false, + 0, + 0, + false), +}; + +struct mn10300_reloc_map +{ + unsigned char bfd_reloc_val; + unsigned char elf_reloc_val; +}; + +static const struct mn10300_reloc_map mn10300_reloc_map[] = +{ + { BFD_RELOC_NONE, R_MN10300_NONE, }, +}; + +static reloc_howto_type * +bfd_elf32_bfd_reloc_type_lookup (abfd, code) + bfd *abfd; + bfd_reloc_code_real_type code; +{ + unsigned int i; + + for (i = 0; + i < sizeof (mn10300_reloc_map) / sizeof (struct mn10300_reloc_map); + i++) + { + if (mn10300_reloc_map[i].bfd_reloc_val == code) + return &elf_mn10300_howto_table[mn10300_reloc_map[i].elf_reloc_val]; + } + + return NULL; +} + +/* Set the howto pointer for an V850 ELF reloc. */ + +static void +mn10300_info_to_howto_rel (abfd, cache_ptr, dst) + bfd *abfd; + arelent *cache_ptr; + Elf32_Internal_Rel *dst; +{ + unsigned int r_type; + + r_type = ELF32_R_TYPE (dst->r_info); + BFD_ASSERT (r_type < (unsigned int) R_MN10300_MAX); + cache_ptr->howto = &elf_mn10300_howto_table[r_type]; +} + +#define TARGET_LITTLE_SYM bfd_elf32_mn10300_vec +#define TARGET_LITTLE_NAME "elf32-mn10300" +#define ELF_ARCH bfd_arch_mn10300 +#define ELF_MACHINE_CODE EM_CYGNUS_MN10300 +#define ELF_MAXPAGESIZE 0x1000 + +#define elf_info_to_howto 0 +#define elf_info_to_howto_rel mn10300_info_to_howto_rel + +#include "elf32-target.h" diff --git a/bfd/targets.c b/bfd/targets.c index 5e7a470..964e656 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -503,7 +503,8 @@ extern const bfd_target bfd_elf32_m32r_vec; /* end-sanitize-m32r */ extern const bfd_target bfd_elf32_m68k_vec; extern const bfd_target bfd_elf32_m88k_vec; -extern const bfd_target bfd_elf32_mn10x00_vec; +extern const bfd_target bfd_elf32_mn10200_vec; +extern const bfd_target bfd_elf32_mn10300_vec; extern const bfd_target bfd_elf32_powerpc_vec; extern const bfd_target bfd_elf32_powerpcle_vec; extern const bfd_target bfd_elf32_sh_vec; @@ -664,7 +665,8 @@ const bfd_target * const bfd_target_vector[] = { /* start-sanitize-m32r */ &bfd_elf32_m32r_vec, /* end-sanitize-m32r */ - &bfd_elf32_mn10x00_vec, + &bfd_elf32_mn10200_vec, + &bfd_elf32_mn10300_vec, &bfd_elf32_m68k_vec, &bfd_elf32_m88k_vec, &bfd_elf32_sparc_vec, |