From 3b16e843f2a75ccf8e7ecc5102e1217a122a05ad Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 31 Jan 2002 17:33:08 +0000 Subject: Add support for OpenRISC 32-bit embedded processor --- bfd/coffcode.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'bfd/coffcode.h') diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 0b185a5..976efe1 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -1822,6 +1822,13 @@ coff_set_arch_mach_hook (abfd, filehdr) machine = 0; switch (internal_f->f_magic) { +#ifdef OR32_MAGIC_BIG + case OR32_MAGIC_BIG: + case OR32_MAGIC_LITTLE: + arch = bfd_arch_or32; + machine = 0; + break; +#endif #ifdef PPCMAGIC case PPCMAGIC: arch = bfd_arch_powerpc; @@ -2779,6 +2786,15 @@ coff_set_flags (abfd, magicp, flagsp) return true; #endif +#ifdef OR32_MAGIC_BIG + case bfd_arch_or32: + if (bfd_big_endian (abfd)) + * magicp = OR32_MAGIC_BIG; + else + * magicp = OR32_MAGIC_LITTLE; + return true; +#endif + default: /* Unknown architecture. */ /* Fall through to "return false" below, to avoid "statement never reached" errors on the one below. */ @@ -3830,6 +3846,11 @@ coff_write_object_contents (abfd) internal_a.magic = MIPS_PE_MAGIC; #endif +#ifdef OR32 +#define __A_MAGIC_SET__ + internal_a.magic = NMAGIC; /* Assume separate i/d. */ +#endif + #ifndef __A_MAGIC_SET__ #include "Your aouthdr magic number is not being set!" #else -- cgit v1.1