diff options
author | Nick Clifton <nickc@redhat.com> | 2005-01-10 16:33:51 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-01-10 16:33:51 +0000 |
commit | aa65cfd7d7f2bfa3e2e4946641ce9fffa321a5b3 (patch) | |
tree | 2c3becaa429761435efd76aceb86171f77631002 /bfd | |
parent | e025d39e08c2c2cf5709149f6c66a1faf2a6fde7 (diff) | |
download | gdb-aa65cfd7d7f2bfa3e2e4946641ce9fffa321a5b3.tar.gz |
Add support for maxq10 and maxq20 machine values
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 10 | ||||
-rw-r--r-- | bfd/archures.c | 4 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 2 | ||||
-rw-r--r-- | bfd/coffcode.h | 27 | ||||
-rw-r--r-- | bfd/cpu-maxq.c | 41 |
5 files changed, 67 insertions, 17 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1cff339560f..92ca82b8e9f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com> + + * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20. + * bfd-in2.h: Regenerate. + * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code + to support these new machine values. + * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for + the maxq10. + (bfd_maxq_arch): Update values for the maxq20. + 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr> * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a diff --git a/bfd/archures.c b/bfd/archures.c index b7fa3bc6586..af25ef626db 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -1,6 +1,6 @@ /* BFD library support routines for architectures. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004 + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Hacked by John Gilmore and Steve Chamberlain of Cygnus Support. @@ -356,6 +356,8 @@ DESCRIPTION . bfd_arch_xtensa, {* Tensilica's Xtensa cores. *} .#define bfd_mach_xtensa 1 . bfd_arch_maxq, {* Dallas MAXQ 10/20 *} +.#define bfd_mach_maxq10 10 +.#define bfd_mach_maxq20 20 . bfd_arch_last . }; */ diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index bc497ca6f3d..fe4116149cf 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1808,6 +1808,8 @@ enum bfd_architecture bfd_arch_xtensa, /* Tensilica's Xtensa cores. */ #define bfd_mach_xtensa 1 bfd_arch_maxq, /* Dallas MAXQ 10/20 */ +#define bfd_mach_maxq10 10 +#define bfd_mach_maxq20 20 bfd_arch_last }; diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 63a2c639b68..30560aa8148 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -1989,7 +1989,17 @@ coff_set_arch_mach_hook (abfd, filehdr) #ifdef MAXQ20MAGIC case MAXQ20MAGIC: arch = bfd_arch_maxq; - machine = 0; + switch (internal_f->f_flags & F_MACHMASK) + { + case F_MAXQ10: + machine = bfd_mach_maxq10; + break; + case F_MAXQ20: + machine = bfd_mach_maxq20; + break; + default: + return FALSE; + } break; #endif #ifdef MC88MAGIC @@ -2927,9 +2937,18 @@ coff_set_flags (abfd, magicp, flagsp) #ifdef MAXQ20MAGIC case bfd_arch_maxq: - *magicp = MAXQ20MAGIC; - return TRUE; - break; + * magicp = MAXQ20MAGIC; + switch (bfd_get_mach (abfd)) + { + case bfd_mach_maxq10: + * flagsp = F_MAXQ10; + return TRUE; + case bfd_mach_maxq20: + * flagsp = F_MAXQ20; + return TRUE; + default: + return FALSE; + } #endif default: /* Unknown architecture. */ diff --git a/bfd/cpu-maxq.c b/bfd/cpu-maxq.c index 9c36a161804..bec43ea221d 100644 --- a/bfd/cpu-maxq.c +++ b/bfd/cpu-maxq.c @@ -1,5 +1,5 @@ /* BFD support for the MAXQ20/10 architecture. - Copyright 2004 Free Software Foundation, Inc. + Copyright 2004, 2005 Free Software Foundation, Inc. Written by Vineet Sharma(vineets@noida.hcltech.com) Inderpreet Singh(inderpreetb@noida.hcltech.com) @@ -25,18 +25,35 @@ #include "libbfd.h" /* MAXQ Archtecture info. */ -const bfd_arch_info_type bfd_maxq_arch = +static const bfd_arch_info_type bfd_maxq10_arch = { - 16, /* 16 bits in a word */ - 16, /* 16 bits in an address */ - 8, /* 16 bits in a byte */ - bfd_arch_maxq, /* enum bfd_archtecture arch */ - 0, /* only 1 machine */ - "maxq", /* arch_name */ - "maxq", /* printable name */ - 0, /* section align power */ - TRUE, /* the_default: if this is the machine */ - bfd_default_compatible, /* bfd_arch_info */ + 16, /* 16 bits in a word. */ + 16, /* 16 bits in an address. */ + 8, /* 16 bits in a byte. */ + bfd_arch_maxq, /* Architecture number. */ + bfd_mach_maxq10, /* Machine number. */ + "maxq", /* Architecture name. */ + "maxq10", /* Machine name. */ + 0, /* Section align power. */ + FALSE, /* Not the default machine. */ + bfd_default_compatible, bfd_default_scan, NULL }; + + +const bfd_arch_info_type bfd_maxq_arch = +{ + 16, /* 16 bits in a word. */ + 16, /* 16 bits in an address. */ + 8, /* 16 bits in a byte. */ + bfd_arch_maxq, /* Architecture number. */ + bfd_mach_maxq20, /* Machine number. */ + "maxq", /* Architecture name. */ + "maxq20", /* Machine name. */ + 0, /* Section align power. */ + TRUE, /* This is the default machine. */ + bfd_default_compatible, + bfd_default_scan, + & bfd_maxq10_arch +}; |