From 8c9bfee312ac693df8f1e91d5709c25d38cbd9db Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 14 Feb 1995 19:20:16 +0000 Subject: [PATCH] Reconize old versions of the PowerPC machine code (EM_PPC_OLD and EM_CYGNUS_POWERPC). --- bfd/ChangeLog | 19 +++++++++++++++++++ bfd/elf32-target.h | 12 +++++++++++- bfd/elf64-target.h | 12 +++++++++++- bfd/libelf.h | 4 ++++ 4 files changed, 45 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 47e8c4d672f..3ae79037c6e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,22 @@ +Tue Feb 14 14:04:22 1995 Michael Meissner + + * libelf.h (elf_backend_data): Add fields elf_machine_alt1 and + elf_machine_alt2 which provide alternate versions of the machine + code. + + * elf32-ppc.c (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Define to + recognize old versions of the PowerPC machine code. + + * elf32-target.h (elf32_bed): Initialize alternate machine code + fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2. + + * elf64-target.h (elf64_bed): Initialize alternate machine code + fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2. + + * elfcode.h (elf_object_p, elf_core_file_p): In addition to the + main machine code field, check the two alternate machine code + fields. + Tue Feb 14 12:46:48 1995 Ian Lance Taylor * aoutf1.h (MACHTYPE_OK): Don't define if already defined. Don't diff --git a/bfd/elf32-target.h b/bfd/elf32-target.h index c1091f2a9bb..b6e4b578536 100644 --- a/bfd/elf32-target.h +++ b/bfd/elf32-target.h @@ -149,6 +149,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define elf_backend_ecoff_debug_swap 0 #endif +#ifndef ELF_MACHINE_ALT1 +#define ELF_MACHINE_ALT1 0 +#endif + +#ifndef ELF_MACHINE_ALT2 +#define ELF_MACHINE_ALT2 0 +#endif + static CONST struct elf_backend_data elf32_bed = { #ifdef USE_REL @@ -182,7 +190,9 @@ static CONST struct elf_backend_data elf32_bed = elf_backend_finish_dynamic_sections, elf_backend_begin_write_processing, elf_backend_final_write_processing, - elf_backend_ecoff_debug_swap + elf_backend_ecoff_debug_swap, + ELF_MACHINE_ALT1, + ELF_MACHINE_ALT2 }; #ifdef TARGET_BIG_SYM diff --git a/bfd/elf64-target.h b/bfd/elf64-target.h index 006d60cbdb0..0a8e9115637 100644 --- a/bfd/elf64-target.h +++ b/bfd/elf64-target.h @@ -152,6 +152,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define elf_backend_ecoff_debug_swap 0 #endif +#ifndef ELF_MACHINE_ALT1 +#define ELF_MACHINE_ALT1 0 +#endif + +#ifndef ELF_MACHINE_ALT2 +#define ELF_MACHINE_ALT2 0 +#endif + static CONST struct elf_backend_data elf64_bed = { #ifdef USE_REL @@ -185,7 +193,9 @@ static CONST struct elf_backend_data elf64_bed = elf_backend_finish_dynamic_sections, elf_backend_begin_write_processing, elf_backend_final_write_processing, - elf_backend_ecoff_debug_swap + elf_backend_ecoff_debug_swap, + ELF_MACHINE_ALT1, + ELF_MACHINE_ALT2 }; #ifdef TARGET_BIG_SYM diff --git a/bfd/libelf.h b/bfd/libelf.h index 5fb58c0c2fc..1c75f482b35 100644 --- a/bfd/libelf.h +++ b/bfd/libelf.h @@ -399,6 +399,10 @@ struct elf_backend_data /* The swapping table to use when dealing with ECOFF information. Used for the MIPS ELF .mdebug section. */ const struct ecoff_debug_swap *elf_backend_ecoff_debug_swap; + + /* Alternate EM_xxxx machine codes for this backend. */ + int elf_machine_alt1; + int elf_machine_alt2; }; /* Information stored for each BFD section in an ELF file. This -- 2.30.2