summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-09-04 11:04:38 +0000
committerNick Clifton <nickc@redhat.com>2003-09-04 11:04:38 +0000
commit02b885638603d31f70a1d575b38314d4baf34d14 (patch)
treecfeb03f393b4083e567b6c9498d9298c6e983f1d /bfd
parent0e60311efeef8538699a5d5d7175910b135b77e0 (diff)
downloadgdb-02b885638603d31f70a1d575b38314d4baf34d14.tar.gz
Add binutils support for v850e1 processor
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog12
-rw-r--r--bfd/archures.c1
-rw-r--r--bfd/bfd-in2.h1
-rw-r--r--bfd/cpu-v850.c4
-rw-r--r--bfd/elf32-v850.c25
-rw-r--r--bfd/libbfd.h2
6 files changed, 42 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 003e7ac1c79..7353bdd5cf4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,15 @@
+2003-09-04 Nick Clifton <nickc@redhat.com>
+
+ * archures.c (bfd_mach_v850e1): Define.
+ * bfd-in2.h: Regenerate.
+ * cpu-v850.h (scan): Accept bfd_mach_v850e1.
+ (arch_info_struct): Include an entry for bfd_mach_v850e1.
+ * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
+ (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
+ (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
+ (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
+ linked with v850e binaries. Mark the output as v850e.
+
2003-09-03 Nick Clifton <nickc@redhat.com>
* cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
diff --git a/bfd/archures.c b/bfd/archures.c
index 407cd263141..3e0cafdd3b4 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -253,6 +253,7 @@ DESCRIPTION
. bfd_arch_v850, {* NEC V850 *}
.#define bfd_mach_v850 1
.#define bfd_mach_v850e 'E'
+.#define bfd_mach_v850e1 '1'
. 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 38cb316f7d2..d81e56fad3c 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1682,6 +1682,7 @@ enum bfd_architecture
bfd_arch_v850, /* NEC V850 */
#define bfd_mach_v850 1
#define bfd_mach_v850e 'E'
+#define bfd_mach_v850e1 '1'
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 fe966567650..1ff1cb3af5c 100644
--- a/bfd/cpu-v850.c
+++ b/bfd/cpu-v850.c
@@ -1,5 +1,6 @@
/* BFD support for the NEC V850 processor
- Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -30,6 +31,7 @@
static const bfd_arch_info_type arch_info_struct[] =
{
+ N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[1]),
N (bfd_mach_v850e, "v850e", FALSE, NULL)
};
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 8437c3ddec9..0dc6542b2d6 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1877,6 +1877,9 @@ v850_elf_object_p (abfd)
case E_V850E_ARCH:
bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850e);
break;
+ case E_V850E1_ARCH:
+ bfd_default_set_arch_mach (abfd, bfd_arch_v850, bfd_mach_v850e1);
+ break;
}
return TRUE;
}
@@ -1895,6 +1898,7 @@ v850_elf_final_write_processing (abfd, linker)
default:
case bfd_mach_v850: val = E_V850_ARCH; break;
case bfd_mach_v850e: val = E_V850E_ARCH; break;
+ case bfd_mach_v850e1: val = E_V850E1_ARCH; break;
}
elf_elfheader (abfd)->e_flags &=~ EF_V850_ARCH;
@@ -1960,8 +1964,24 @@ v850_elf_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_V850_ARCH) != (out_flags & EF_V850_ARCH)
&& (in_flags & EF_V850_ARCH) != E_V850_ARCH)
- _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
- bfd_archive_filename (ibfd));
+ {
+ /* Allow v850e1 binaries to be linked with v850e binaries.
+ Set the output binary to v850e. */
+ if ((in_flags & EF_V850_ARCH) == E_V850E1_ARCH
+ && (out_flags & EF_V850_ARCH) == E_V850E_ARCH)
+ return TRUE;
+
+ if ((in_flags & EF_V850_ARCH) == E_V850E_ARCH
+ && (out_flags & EF_V850_ARCH) == E_V850E1_ARCH)
+ {
+ elf_elfheader (obfd)->e_flags =
+ ((out_flags & ~ EF_V850_ARCH) | E_V850E_ARCH);
+ return TRUE;
+ }
+
+ _bfd_error_handler (_("%s: Architecture mismatch with previous modules"),
+ bfd_archive_filename (ibfd));
+ }
return TRUE;
}
@@ -1987,6 +2007,7 @@ v850_elf_print_private_bfd_data (abfd, ptr)
default:
case E_V850_ARCH: fprintf (file, _("v850 architecture")); break;
case E_V850E_ARCH: fprintf (file, _("v850e architecture")); break;
+ case E_V850E1_ARCH: fprintf (file, _("v850e1 architecture")); break;
}
fputc ('\n', file);
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 61c8e65771d..a428c660c8a 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -854,6 +854,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MIPS_REL16",
"BFD_RELOC_MIPS_RELGOT",
"BFD_RELOC_MIPS_JALR",
+
"BFD_RELOC_FRV_LABEL16",
"BFD_RELOC_FRV_LABEL24",
"BFD_RELOC_FRV_LO16",
@@ -863,6 +864,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_FRV_GPREL32",
"BFD_RELOC_FRV_GPRELHI",
"BFD_RELOC_FRV_GPRELLO",
+
"BFD_RELOC_MN10300_GOTOFF24",
"BFD_RELOC_MN10300_GOT32",
"BFD_RELOC_MN10300_GOT24",