summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-07-29 05:17:39 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-07-29 05:17:39 +0000
commit05c67a55938a2c65717bfe77761f1285dfdfca0b (patch)
treeceefc00b369230390fb0cfe69a70db6c6a33d79d
parent80220685144af2b8e76a16c45a8b376d9acfb8dd (diff)
downloadgdb-05c67a55938a2c65717bfe77761f1285dfdfca0b.tar.gz
include/elf/ChangeLog:
Introduce SH2a support. 2004-02-18 Corinna Vinschen <vinschen@redhat.com> * sh.h (EF_SH2A_NOFPU): New. 2003-12-01 Michael Snyder <msnyder@redhat.com> * sh.h (EF_SH2A): New. bfd/ChangeLog: Introduce SH2a support. 2004-02-18 Corinna Vinschen <vinschen@redhat.com> * archures.c (bfd_mach_sh2a_nofpu): New. * bfd-in2.h: Rebuilt. * cpu-sh.c (SH2A_NOFPU_NEXT): New. (arch_info_struct): Add sh2a_nofpu. * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu. 2003-12-29 DJ Delorie <dj@redhat.com> * reloc.c: Add relocs for sh2a. * bfd-in2.h: Regenerate. * libbfd.hh: Regenerate. 2003-12-01 Michael Snyder <msnyder@redhat.com> * archures.c (bfd_mach_sh2a): New. * bfd-in2.h: Rebuilt. * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums. (SH2A_NEXT): New. (arch_info_struct): Add sh2a. * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a. binutils/ChangeLog: * readelf.c (get_machine_flags <EM_SH>): Handle EF_SH2A and EF_SH2A_NOFPU. gas/ChangeLog: Introduce SH2a support. 2004-02-24 Corinna Vinschen <vinschen@redhat.com> * config/tc-sh.c (get_specific): Change arch_sh2a_up to arch_sh2a_nofpu_up. 2004-02-24 Corinna Vinschen <vinschen@redhat.com> * config/tc-sh.c (md_parse_option): Add sh2a-nofpu ISA handling. 2004-02-20 Corinna Vinschen <vinschen@redhat.com> * config/tc-sh.c (sh_elf_final_processing): Move sh2a recognition to end of conditional expression. 2004-02-20 Corinna Vinschen <vinschen@redhat.com> * config/tc-sh.c: Add sh2a-nofpu support. 2003-12-29 DJ Delorie <dj@redhat.com> * tc-sh.c: Add sh2a support. (parse_reg): Add tbr. (parse_at): Support @@(disp,tbr). (get_specific): Support sh2a opcodes. (insert4): New, for 4 byte relocs. (build_Mytes): Support sh2a opcodes. (md_apply_fix3_Mytes): Support sh2a opcodes. 2003-12-02 Michael Snyder <msnyder@redhat.com> * config/tc-sh.c (md_parse_option): Handle sh2a. (sh_elf_final_processing): Ditto. gas/testsuite/ChangeLog: 2003-12-30 DJ Delorie <dj@redhat.com> * gas/sh/sh2a.s: New. * gas/sh/sh2a.d: New. * gas/sh/basic.exp: Add it.
-rw-r--r--bfd/ChangeLog21
-rw-r--r--bfd/archures.c2
-rw-r--r--bfd/bfd-in2.h10
-rw-r--r--bfd/cpu-sh.c32
-rw-r--r--bfd/elf32-sh.c8
-rw-r--r--bfd/libbfd.h8
-rw-r--r--bfd/reloc.c16
-rw-r--r--include/elf/ChangeLog8
-rw-r--r--include/elf/sh.h7
9 files changed, 109 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ef719fc3013..fc1aaff9e32 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,24 @@
+2004-07-29 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce SH2a support.
+ 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
+ * archures.c (bfd_mach_sh2a_nofpu): New.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (SH2A_NOFPU_NEXT): New.
+ (arch_info_struct): Add sh2a_nofpu.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
+ 2003-12-29 DJ Delorie <dj@redhat.com>
+ * reloc.c: Add relocs for sh2a.
+ * bfd-in2.h: Regenerate.
+ * libbfd.hh: Regenerate.
+ 2003-12-01 Michael Snyder <msnyder@redhat.com>
+ * archures.c (bfd_mach_sh2a): New.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
+ (SH2A_NEXT): New.
+ (arch_info_struct): Add sh2a.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
+
2004-07-28 Nick Clifton <nickc@redhat.com>
John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
diff --git a/bfd/archures.c b/bfd/archures.c
index db206a17ed2..fd34ab61c90 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -229,6 +229,8 @@ DESCRIPTION
.#define bfd_mach_sh 1
.#define bfd_mach_sh2 0x20
.#define bfd_mach_sh_dsp 0x2d
+.#define bfd_mach_sh2a 0x2a
+.#define bfd_mach_sh2a_nofpu 0x2b
.#define bfd_mach_sh2e 0x2e
.#define bfd_mach_sh3 0x30
.#define bfd_mach_sh3_nommu 0x31
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index b6d14ff565d..e693f237c44 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1677,6 +1677,8 @@ enum bfd_architecture
#define bfd_mach_sh 1
#define bfd_mach_sh2 0x20
#define bfd_mach_sh_dsp 0x2d
+#define bfd_mach_sh2a 0x2a
+#define bfd_mach_sh2a_nofpu 0x2b
#define bfd_mach_sh2e 0x2e
#define bfd_mach_sh3 0x30
#define bfd_mach_sh3_nommu 0x31
@@ -2637,6 +2639,14 @@ field in the instruction. */
/* Renesas / SuperH SH relocs. Not all of these appear in object files. */
BFD_RELOC_SH_PCDISP8BY2,
BFD_RELOC_SH_PCDISP12BY2,
+ BFD_RELOC_SH_IMM3,
+ BFD_RELOC_SH_IMM3U,
+ BFD_RELOC_SH_DISP12,
+ BFD_RELOC_SH_DISP12BY2,
+ BFD_RELOC_SH_DISP12BY4,
+ BFD_RELOC_SH_DISP12BY8,
+ BFD_RELOC_SH_DISP20,
+ BFD_RELOC_SH_DISP20BY8,
BFD_RELOC_SH_IMM4,
BFD_RELOC_SH_IMM4BY2,
BFD_RELOC_SH_IMM4BY4,
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index 98d72882dbc..8fe25745c10 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -38,6 +38,8 @@
#define SH4_NOFPU_NEXT &arch_info_struct[11]
#define SH4_NOMMU_NOFPU_NEXT &arch_info_struct[12]
#define SH4A_NOFPU_NEXT &arch_info_struct[13]
+#define SH2A_NEXT &arch_info_struct[14]
+#define SH2A_NOFPU_NEXT &arch_info_struct[15]
#define SH64_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
@@ -225,6 +227,34 @@ static const bfd_arch_info_type arch_info_struct[] =
SH4A_NOFPU_NEXT
},
{
+ 32, /* 32 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_sh,
+ bfd_mach_sh2a,
+ "sh", /* Arch_name. */
+ "sh2a", /* Printable name. */
+ 1,
+ FALSE, /* Not the default. */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH2A_NEXT
+ },
+ {
+ 32, /* 32 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_sh,
+ bfd_mach_sh2a_nofpu,
+ "sh", /* Arch_name. */
+ "sh2a-nofpu", /* Printable name. */
+ 1,
+ FALSE, /* Not the default. */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH2A_NOFPU_NEXT
+ },
+ {
64, /* 64 bits in a word */
64, /* 64 bits in an address */
8, /* 8 bits in a byte */
@@ -269,6 +299,8 @@ static struct { unsigned long bfd_mach, arch, arch_up; } bfd_to_arch_table[] =
{ bfd_mach_sh2, arch_sh2, arch_sh2_up },
{ bfd_mach_sh2e, arch_sh2e, arch_sh2e_up },
{ bfd_mach_sh_dsp, arch_sh_dsp, arch_sh_dsp_up },
+ { bfd_mach_sh2a, arch_sh2a, arch_sh2a_up },
+ { bfd_mach_sh2a_nofpu, arch_sh2a_nofpu, arch_sh2a_nofpu_up },
{ bfd_mach_sh3, arch_sh3, arch_sh3_up },
{ bfd_mach_sh3_nommu, arch_sh3_nommu, arch_sh3_nommu_up },
{ bfd_mach_sh3_dsp, arch_sh3_dsp, arch_sh3_dsp_up },
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index e989bd5a857..00a7e4d56c9 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -6913,7 +6913,13 @@ sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
}
if (! sh_merge_bfd_arch (ibfd, obfd))
- return FALSE;
+ {
+ _bfd_error_handler ("%s: uses instructions which are incompatible "
+ "with instructions used in previous modules",
+ bfd_archive_filename (ibfd));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
elf_elfheader (obfd)->e_flags =
sh_elf_get_flags_from_mach (bfd_get_mach (obfd));
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index c46a6ed5bf8..f85ca402940 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1135,6 +1135,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_GOTPC",
"BFD_RELOC_SH_PCDISP8BY2",
"BFD_RELOC_SH_PCDISP12BY2",
+ "BFD_RELOC_SH_IMM3",
+ "BFD_RELOC_SH_IMM3U",
+ "BFD_RELOC_SH_DISP12",
+ "BFD_RELOC_SH_DISP12BY2",
+ "BFD_RELOC_SH_DISP12BY4",
+ "BFD_RELOC_SH_DISP12BY8",
+ "BFD_RELOC_SH_DISP20",
+ "BFD_RELOC_SH_DISP20BY8",
"BFD_RELOC_SH_IMM4",
"BFD_RELOC_SH_IMM4BY2",
"BFD_RELOC_SH_IMM4BY4",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index b997437889d..74492f02877 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -2614,6 +2614,22 @@ ENUM
ENUMX
BFD_RELOC_SH_PCDISP12BY2
ENUMX
+ BFD_RELOC_SH_IMM3
+ENUMX
+ BFD_RELOC_SH_IMM3U
+ENUMX
+ BFD_RELOC_SH_DISP12
+ENUMX
+ BFD_RELOC_SH_DISP12BY2
+ENUMX
+ BFD_RELOC_SH_DISP12BY4
+ENUMX
+ BFD_RELOC_SH_DISP12BY8
+ENUMX
+ BFD_RELOC_SH_DISP20
+ENUMX
+ BFD_RELOC_SH_DISP20BY8
+ENUMX
BFD_RELOC_SH_IMM4
ENUMX
BFD_RELOC_SH_IMM4BY2
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 408088587b2..2bde490fd10 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,11 @@
+2004-07-29 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce SH2a support.
+ 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
+ * sh.h (EF_SH2A_NOFPU): New.
+ 2003-12-01 Michael Snyder <msnyder@redhat.com>
+ * sh.h (EF_SH2A): New.
+
2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
* crx.h: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
diff --git a/include/elf/sh.h b/include/elf/sh.h
index bab09284265..ddb387b18bc 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -34,10 +34,12 @@
#define EF_SH4 9
#define EF_SH2E 11
#define EF_SH4A 12
+#define EF_SH2A 13
#define EF_SH4_NOFPU 16
#define EF_SH4A_NOFPU 17
#define EF_SH4_NOMMU_NOFPU 18
+#define EF_SH2A_NOFPU 19
#define EF_SH3_NOMMU 20
/* This one can only mix in objects from other EF_SH5 objects. */
@@ -60,11 +62,12 @@
/* EF_SH5 */ 0, \
/* EF_SH2E */ bfd_mach_sh2e , \
/* EF_SH4A */ bfd_mach_sh4a , \
-/* 13, 14, 15 */ 0, 0, 0, \
+/* EF_SH2A */ bfd_mach_sh2a , \
+/* 14, 15 */ 0, 0, \
/* EF_SH4_NOFPU */ bfd_mach_sh4_nofpu , \
/* EF_SH4A_NOFPU */ bfd_mach_sh4a_nofpu , \
/* EF_SH4_NOMMU_NOFPU */ bfd_mach_sh4_nommu_nofpu, \
-/* 19 */ 0, \
+/* EF_SH2A_NOFPU */ bfd_mach_sh2a_nofpu , \
/* EF_SH3_NOMMU */ bfd_mach_sh3_nommu
/* Convert arch_sh* into EF_SH*. */