summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-01-24 11:13:57 +0000
committerNick Clifton <nickc@redhat.com>2013-01-24 11:13:57 +0000
commit3e972a99fc5f33e08893ba191c1b5a3ca8e59ed6 (patch)
tree1c67dc318e02821c28e21fafdcb5a8a5981ec2be /bfd
parent60110dc675ad9f32f98ccd5207c427b3cf8ea62b (diff)
downloadgdb-3e972a99fc5f33e08893ba191c1b5a3ca8e59ed6.tar.gz
Add support for V850E3V5 architecture
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/archures.c1
-rw-r--r--bfd/bfd-in2.h1
-rw-r--r--bfd/cpu-v850.c11
-rw-r--r--bfd/cpu-v850_rh850.c10
-rw-r--r--bfd/elf32-v850.c23
6 files changed, 41 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index dd110b71bc9..6dfcb64052c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2013-01-24 Nick Clifton <nickc@redhat.com>
+
+ * archures.c: Add bfd_mach_v850e3v5.
+ * bfd-in2.h: Regenerate.
+ * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
+ * cpu-v850_rh850.c: Likewise.
+ * elf32-v850.c: Add support for v850e3v5 architecture.
+
2013-01-23 Markos Chandras <markos.chandras@imgtec.com>
* elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
diff --git a/bfd/archures.c b/bfd/archures.c
index d87185dc122..a1b7868a39c 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -330,6 +330,7 @@ DESCRIPTION
.#define bfd_mach_v850e1 '1'
.#define bfd_mach_v850e2 0x4532
.#define bfd_mach_v850e2v3 0x45325633
+.#define bfd_mach_v850e3v5 0x45335635 {* ('E'|'3'|'V'|'5') *}
. bfd_arch_arc, {* ARC Cores *}
.#define bfd_mach_arc_5 5
.#define bfd_mach_arc_6 6
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 3561e192f80..489c3b5d22a 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -2061,6 +2061,7 @@ enum bfd_architecture
#define bfd_mach_v850e1 '1'
#define bfd_mach_v850e2 0x4532
#define bfd_mach_v850e2v3 0x45325633
+#define bfd_mach_v850e3v5 0x45335635 /* ('E'|'3'|'V'|'5') */
bfd_arch_arc, /* ARC Cores */
#define bfd_mach_arc_5 5
#define bfd_mach_arc_6 6
diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c
index bb6b542c8ac..c2f52f11ca0 100644
--- a/bfd/cpu-v850.c
+++ b/bfd/cpu-v850.c
@@ -1,6 +1,5 @@
/* BFD support for the NEC V850 processor
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007,
- 2010, 2012 Free Software Foundation, Inc.
+ Copyright 1996-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -32,9 +31,11 @@
static const bfd_arch_info_type arch_info_struct[] =
{
- N (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[1]),
- N (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[2]),
- N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[3]),
+ N (bfd_mach_v850e3v5, "v850e3v5", FALSE, & arch_info_struct[1]),
+ N (bfd_mach_v850e3v5, "v850e2v4", FALSE, & arch_info_struct[2]),
+ N (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[3]),
+ N (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[4]),
+ N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[5]),
N (bfd_mach_v850e, "v850e", FALSE, NULL)
};
diff --git a/bfd/cpu-v850_rh850.c b/bfd/cpu-v850_rh850.c
index 06abdc7f2da..9402f23a6d2 100644
--- a/bfd/cpu-v850_rh850.c
+++ b/bfd/cpu-v850_rh850.c
@@ -1,5 +1,5 @@
/* BFD support for the NEC V850 processor with the RH850 ABI.
- Copyright 2012 Free Software Foundation, Inc.
+ Copyright 2012-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -29,9 +29,11 @@
static const bfd_arch_info_type arch_info_struct[] =
{
- R (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[1]),
- R (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[2]),
- R (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[3]),
+ R (bfd_mach_v850e3v5, "v850e3v5", FALSE, & arch_info_struct[1]),
+ R (bfd_mach_v850e3v5, "v850e2v4", FALSE, & arch_info_struct[2]),
+ R (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[3]),
+ R (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[4]),
+ R (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[5]),
R (bfd_mach_v850e, "v850e", FALSE, NULL)
};
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 3e24dca1a54..4590c61755a 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1,7 +1,5 @@
/* V850-specific support for 32-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright 1996-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -2340,7 +2338,8 @@ v850_elf_object_p (bfd *abfd)
{
case EM_V800:
arch = bfd_arch_v850_rh850;
- mach = bfd_mach_v850e2v3;
+ mach = (elf_elfheader (abfd)->e_flags & EF_V800_850E3)
+ ? bfd_mach_v850e3v5 : bfd_mach_v850e2v3;
break;
case EM_CYGNUS_V850:
@@ -2354,6 +2353,7 @@ v850_elf_object_p (bfd *abfd)
case E_V850E1_ARCH: mach = bfd_mach_v850e1; break;
case E_V850E2_ARCH: mach = bfd_mach_v850e2; break;
case E_V850E2V3_ARCH: mach = bfd_mach_v850e2v3; break;
+ case E_V850E3V5_ARCH: mach = bfd_mach_v850e3v5; break;
}
break;
@@ -2376,6 +2376,8 @@ v850_elf_final_write_processing (bfd *abfd,
{
case bfd_arch_v850_rh850:
val = EF_RH850_ABI;
+ if (bfd_get_mach (abfd) == bfd_mach_v850e3v5)
+ val |= EF_V800_850E3;
elf_elfheader (abfd)->e_flags |= val;
break;
@@ -2388,6 +2390,7 @@ v850_elf_final_write_processing (bfd *abfd,
case bfd_mach_v850e1: val = E_V850E1_ARCH; break;
case bfd_mach_v850e2: val = E_V850E2_ARCH; break;
case bfd_mach_v850e2v3: val = E_V850E2V3_ARCH; break;
+ case bfd_mach_v850e3v5: val = E_V850E3V5_ARCH; break;
}
elf_elfheader (abfd)->e_flags &=~ EF_V850_ARCH;
elf_elfheader (abfd)->e_flags |= val;
@@ -2507,6 +2510,17 @@ v850_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
return TRUE;
}
+ if (( (in_flags & EF_V850_ARCH) == E_V850_ARCH
+ || (in_flags & EF_V850_ARCH) == E_V850E_ARCH
+ || (in_flags & EF_V850_ARCH) == E_V850E2_ARCH
+ || (in_flags & EF_V850_ARCH) == E_V850E2V3_ARCH)
+ && (out_flags & EF_V850_ARCH) == E_V850E3V5_ARCH)
+ {
+ elf_elfheader (obfd)->e_flags =
+ ((out_flags & ~ EF_V850_ARCH) | E_V850E3V5_ARCH);
+ return TRUE;
+ }
+
_bfd_error_handler (_("%B: Architecture mismatch with previous modules"),
ibfd);
}
@@ -2550,6 +2564,7 @@ v850_elf_print_private_bfd_data (bfd *abfd, void * ptr)
case E_V850E1_ARCH: fprintf (file, _("v850e1 architecture")); break;
case E_V850E2_ARCH: fprintf (file, _("v850e2 architecture")); break;
case E_V850E2V3_ARCH: fprintf (file, _("v850e2v3 architecture")); break;
+ case E_V850E3V5_ARCH: fprintf (file, _("v850e3v5 architecture")); break;
}
}