From 2e0a5c1051afa19dd41d47c42db5f2f3a863c56a Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 16 Dec 1997 00:12:39 +0000 Subject: [PATCH] improve support for m32rx processor. --- bfd/ChangeLog | 7 +++++++ bfd/archures.c | 2 ++ bfd/elf32-m32r.c | 16 ++++++++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f1b6464a98c..d1a585cc731 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +Mon Dec 15 16:08:52 1997 Nick Clifton + + * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Allow M32R + object files to be merged into a M32RX executable. + + * archures.c: Add bfd_mach_m32r and bfd_mach_m32rx. + Mon Dec 15 16:11:22 1997 Fred Fish * coffcode.h (ALIGN_SECTIONS_IN_FILE): Define if I960 not defined. diff --git a/bfd/archures.c b/bfd/archures.c index 08823ffc861..92f30a578f5 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -167,6 +167,8 @@ DESCRIPTION . bfd_arch_arc, {* Argonaut RISC Core *} .#define bfd_mach_arc_base 0 . bfd_arch_m32r, {* Mitsubishi M32R/D *} +.#define bfd_mach_m32r 0 {* backwards compatibility *} +.#define bfd_mach_m32rx 'x' . bfd_arch_mn10200, {* Matsushita MN10200 *} . bfd_arch_mn10300, {* Matsushita MN10300 *} . bfd_arch_last diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 3da71e27bc1..39decd225c8 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -1837,12 +1837,20 @@ m32r_elf_merge_private_bfd_data (ibfd, obfd) if ((new_flags & EF_M32R_ARCH) != (old_flags & EF_M32R_ARCH)) { - _bfd_error_handler ("%s: Instruction set mismatch with previous modules", - bfd_get_filename (ibfd)); + if ((new_flags & EF_M32R_ARCH) == E_M32RX_ARCH) + { + _bfd_error_handler ("%s: Instruction set mismatch with previous modules", + bfd_get_filename (ibfd)); #if 1 - bfd_set_error (bfd_error_bad_value); - return false; + bfd_set_error (bfd_error_bad_value); + return false; #endif + } + else + { + _bfd_error_handler ("%s: Merging M32R instructions with M32RX instructions", + bfd_get_filename (ibfd)); + } } return true; -- 2.30.2