diff options
author | Michael Snyder <msnyder@vmware.com> | 2003-05-16 23:39:24 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2003-05-16 23:39:24 +0000 |
commit | 01b20e77621c418fca9b7abd5bc407c77c3a02e0 (patch) | |
tree | c97173a67a26b81be620b40d999ef7fc0b9c7198 | |
parent | 9a2ab2466af0037557ddea3e3de77ff7d10b5db4 (diff) | |
download | binutils-redhat-01b20e77621c418fca9b7abd5bc407c77c3a02e0.tar.gz |
2003-05-16 Michael Snyder <msnyder@redhat.com>
From Bernd Schmidt <bernds@redhat.com>
* archures.c (bfd_mach_h8300sx): New.
* bfd-in2.h: Regenerate.
* cpu-h8300.c (h8300_scan)): Add support for h8300sx.
(h8300sx_info_struct): New.
(h8300s_info_struct): Link to it.
* elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
(elf32_h8_final_write_processing): Likewise.
(elf32_h8_relax_section): Likewise.
-rw-r--r-- | bfd/ChangeLog | 11 | ||||
-rw-r--r-- | bfd/archures.c | 1 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 1 | ||||
-rw-r--r-- | bfd/cpu-h8300.c | 21 | ||||
-rw-r--r-- | bfd/elf32-h8300.c | 17 |
5 files changed, 48 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c0972f6b60..bf7b1f6d04 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,14 @@ +2003-05-16 Michael Snyder <msnyder@redhat.com> + From Bernd Schmidt <bernds@redhat.com> + * archures.c (bfd_mach_h8300sx): New. + * bfd-in2.h: Regenerate. + * cpu-h8300.c (h8300_scan)): Add support for h8300sx. + (h8300sx_info_struct): New. + (h8300s_info_struct): Link to it. + * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx. + (elf32_h8_final_write_processing): Likewise. + (elf32_h8_relax_section): Likewise. + 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com> * config.bfd: Accept i[3-7]86 variants. diff --git a/bfd/archures.c b/bfd/archures.c index 3d473c3b8a..250892ce53 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -169,6 +169,7 @@ DESCRIPTION .#define bfd_mach_h8300s 3 .#define bfd_mach_h8300hn 4 .#define bfd_mach_h8300sn 5 +.#define bfd_mach_h8300sx 6 . bfd_arch_pdp11, {* DEC PDP-11 *} . bfd_arch_powerpc, {* PowerPC *} .#define bfd_mach_ppc 32 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 637376bc0d..4f7014e2be 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1635,6 +1635,7 @@ enum bfd_architecture #define bfd_mach_h8300s 3 #define bfd_mach_h8300hn 4 #define bfd_mach_h8300sn 5 +#define bfd_mach_h8300sx 6 bfd_arch_pdp11, /* DEC PDP-11 */ bfd_arch_powerpc, /* PowerPC */ #define bfd_mach_ppc 32 diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c index 2a5c604df6..f61e7576a8 100644 --- a/bfd/cpu-h8300.c +++ b/bfd/cpu-h8300.c @@ -81,6 +81,9 @@ h8300_scan (info, string) if (*string == 'n' || *string == 'N') return (info->mach == bfd_mach_h8300sn); + if (*string == 'x' || *string == 'X') + return (info->mach == bfd_mach_h8300sx); + return (info->mach == bfd_mach_h8300s); } else @@ -103,6 +106,22 @@ compatible (in, out) return in; } +static const bfd_arch_info_type h8300sx_info_struct = +{ + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_h8300, + bfd_mach_h8300sx, + "h8300sx", /* arch_name */ + "h8300sx", /* printable name */ + 1, + FALSE, /* the default machine */ + compatible, + h8300_scan, + 0 +}; + static const bfd_arch_info_type h8300sn_info_struct = { 32, /* 32 bits in a word. */ @@ -116,7 +135,7 @@ static const bfd_arch_info_type h8300sn_info_struct = FALSE, /* The default machine. */ compatible, h8300_scan, - 0 + &h8300sx_info_struct }; diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c index 5a26fbdb20..f272dc8e08 100644 --- a/bfd/elf32-h8300.c +++ b/bfd/elf32-h8300.c @@ -579,6 +579,9 @@ elf32_h8_mach (flags) case E_H8_MACH_H8300SN: return bfd_mach_h8300sn; + + case E_H8_MACH_H8300SX: + return bfd_mach_h8300sx; } } @@ -615,6 +618,10 @@ elf32_h8_final_write_processing (abfd, linker) case bfd_mach_h8300sn: val = E_H8_MACH_H8300SN; break; + + case bfd_mach_h8300sx: + val = E_H8_MACH_H8300SX; + break; } elf_elfheader (abfd)->e_flags &= ~ (EF_H8_MACH); @@ -1023,7 +1030,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again) && value >= 0xff00 && value <= 0xffff) || ((bfd_get_mach (abfd) == bfd_mach_h8300h - || bfd_get_mach (abfd) == bfd_mach_h8300s) + /* FIXME: h8300hn? */ + || bfd_get_mach (abfd) == bfd_mach_h8300s + /* FIXME: h8300sn? */ + || bfd_get_mach (abfd) == bfd_mach_h8300sx) && value >= 0xffff00 && value <= 0xffffff)) { @@ -1081,7 +1091,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again) && value >= 0xff00 && value <= 0xffff) || ((bfd_get_mach (abfd) == bfd_mach_h8300h - || bfd_get_mach (abfd) == bfd_mach_h8300s) + /* FIXME: h8300hn? */ + || bfd_get_mach (abfd) == bfd_mach_h8300s + /* FIXME: h8300sn? */ + || bfd_get_mach (abfd) == bfd_mach_h8300sx) && value >= 0xffff00 && value <= 0xffffff)) { |