aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-07-29 05:17:41 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-07-29 05:17:41 +0000
commit1d70c7fb832949b7322234e33454a128e0adb674 (patch)
tree1baaafc6acdcecc2e80bc6afca9fa385ad15ed75 /bfd
parente7fbc2bf98c9a29fa479efe08fd7d77fd163d7b9 (diff)
downloadgdb-1d70c7fb832949b7322234e33454a128e0adb674.zip
gdb-1d70c7fb832949b7322234e33454a128e0adb674.tar.gz
gdb-1d70c7fb832949b7322234e33454a128e0adb674.tar.bz2
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.
Diffstat (limited to 'bfd')
-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
7 files changed, 96 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ef719fc..fc1aaff 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 db206a1..fd34ab6 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 b6d14ff..e693f23 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 98d7288..8fe2574 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 e989bd5..00a7e4d 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 c46a6ed..f85ca40 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 b997437..74492f0 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