/* BFD library support routines for architectures.
- Copyright (C) 1990-1991 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
The architecture information is provided by each architecture package.
The set of default architectures is selected by the macro
<<SELECT_ARCHITECTURES>>. This is normally set up in the
- <<config/target.mt>> file of your choice. If the name is not
+ @file{config/@var{target}.mt} file of your choice. If the name is not
defined, then all the architectures supported are included.
When BFD starts up, all the architectures are called with an
generally this would be one for each machine and one for the
default case (an item with a machine field of 0).
- BFD's idea of an architecture is implemented in <<archures.c>>.
+ BFD's idea of an architecture is implemented in @file{archures.c}.
*/
/*
.#define bfd_mach_i960_mc 4
.#define bfd_mach_i960_xa 5
.#define bfd_mach_i960_ca 6
+. {* start-sanitize-i960xl *}
+.#define bfd_mach_i960_xl 7
+. {* end-sanitize-i960xl *}
.
. bfd_arch_a29k, {* AMD 29000 *}
. bfd_arch_sparc, {* SPARC *}
. bfd_arch_h8300, {* Hitachi H8/300 *}
.#define bfd_mach_h8300 1
.#define bfd_mach_h8300h 2
+. bfd_arch_powerpc, {* PowerPC *}
. bfd_arch_rs6000, {* IBM RS/6000 *}
. bfd_arch_hppa, {* HP PA RISC *}
. bfd_arch_z8k, {* Zilog Z8000 *}
. bfd_arch_h8500, {* Hitachi H8/500 *}
. bfd_arch_sh, {* Hitachi SH *}
. bfd_arch_alpha, {* Dec Alpha *}
+. bfd_arch_arm, {* Advanced Risc Machines ARM *}
+. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
+. {* start-sanitize-rce *}
+. bfd_arch_rce, {* Motorola RCE *}
+. {* end-sanitize-rce *}
+. {* start-sanitize-arc *}
+. bfd_arch_arc, {* Argonaut RISC Core *}
+. {* end-sanitize-arc *}
. bfd_arch_last
. };
*/
CONST char *
-DEFUN(bfd_printable_name, (abfd),
- bfd *abfd)
+bfd_printable_name (abfd)
+ bfd *abfd;
{
return abfd->arch_info->printable_name;
}
*/
bfd_arch_info_type *
-DEFUN(bfd_scan_arch,(string),
- CONST char *string)
+bfd_scan_arch (string)
+ CONST char *string;
{
struct bfd_arch_info *ap;
*/
CONST bfd_arch_info_type *
-DEFUN(bfd_arch_get_compatible,(abfd, bbfd),
-CONST bfd *abfd AND
-CONST bfd *bbfd)
-
+bfd_arch_get_compatible (abfd, bbfd)
+ CONST bfd *abfd;
+ CONST bfd *bbfd;
{
return abfd->arch_info->compatible(abfd->arch_info,bbfd->arch_info);
}
Set the architecture info of @var{abfd} to @var{arg}.
*/
-void DEFUN(bfd_set_arch_info,(abfd, arg),
-bfd *abfd AND
-bfd_arch_info_type *arg)
+void
+bfd_set_arch_info (abfd, arg)
+ bfd *abfd;
+ bfd_arch_info_type *arg;
{
abfd->arch_info = arg;
}
pointer.
*/
-boolean DEFUN(bfd_default_set_arch_mach,(abfd, arch, mach),
- bfd *abfd AND
- enum bfd_architecture arch AND
- unsigned long mach)
+boolean
+bfd_default_set_arch_mach (abfd, arch, mach)
+ bfd *abfd;
+ enum bfd_architecture arch;
+ unsigned long mach;
{
static struct bfd_arch_info *old_ptr = &bfd_default_arch_struct;
boolean found = false;
if (found==false) {
/*looked for it and it wasn't there, so put in the default */
old_ptr = &bfd_default_arch_struct;
- bfd_error = bad_value;
+ bfd_set_error (bfd_error_bad_value);
}
}
else {
*/
-enum bfd_architecture DEFUN(bfd_get_arch, (abfd), bfd *abfd)
+enum bfd_architecture
+bfd_get_arch (abfd)
+ bfd *abfd;
{
return abfd->arch_info->arch;
}
*/
unsigned long
-DEFUN(bfd_get_mach, (abfd), bfd *abfd)
+bfd_get_mach (abfd)
+ bfd *abfd;
{
return abfd->arch_info->mach;
}
*/
-unsigned int DEFUN(bfd_arch_bits_per_byte, (abfd), bfd *abfd)
+unsigned int
+bfd_arch_bits_per_byte (abfd)
+ bfd *abfd;
{
return abfd->arch_info->bits_per_byte;
}
architecture's addresses.
*/
-unsigned int DEFUN(bfd_arch_bits_per_address, (abfd), bfd *abfd)
+unsigned int
+bfd_arch_bits_per_address (abfd)
+ bfd *abfd;
{
return abfd->arch_info->bits_per_address;
}
extern void bfd_a29k_arch PARAMS ((void));
extern void bfd_alpha_arch PARAMS ((void));
+/* start-sanitize-arc */
+extern void bfd_arc_arch PARAMS ((void));
+/* end-sanitize-arc */
+extern void bfd_arm_arch PARAMS ((void));
extern void bfd_h8300_arch PARAMS ((void));
extern void bfd_h8500_arch PARAMS ((void));
extern void bfd_hppa_arch PARAMS ((void));
extern void bfd_m68k_arch PARAMS ((void));
extern void bfd_m88k_arch PARAMS ((void));
extern void bfd_mips_arch PARAMS ((void));
+extern void bfd_powerpc_arch PARAMS ((void));
extern void bfd_rs6000_arch PARAMS ((void));
extern void bfd_sh_arch PARAMS ((void));
+/* start-sanitize-rce */
+extern void bfd_rce_arch PARAMS ((void));
+/* end-sanitize-rce */
extern void bfd_sparc_arch PARAMS ((void));
extern void bfd_vax_arch PARAMS ((void));
extern void bfd_we32k_arch PARAMS ((void));
extern void bfd_z8k_arch PARAMS ((void));
+extern void bfd_ns32k_arch PARAMS ((void));
-static void (*archures_init_table[]) PARAMS ((void)) =
+static void (*const archures_init_table[]) PARAMS ((void)) =
{
#ifdef SELECT_ARCHITECTURES
SELECT_ARCHITECTURES,
#else
bfd_a29k_arch,
bfd_alpha_arch,
+/* start-sanitize-arc */
+ bfd_arc_arch,
+/* end-sanitize-arc */
+ bfd_arm_arch,
bfd_h8300_arch,
bfd_h8500_arch,
bfd_hppa_arch,
bfd_m68k_arch,
bfd_m88k_arch,
bfd_mips_arch,
+ bfd_powerpc_arch,
bfd_rs6000_arch,
bfd_sh_arch,
+/* start-sanitize-rce */
+ bfd_rce_arch,
+/* end-sanitize-rce */
bfd_sparc_arch,
bfd_vax_arch,
bfd_we32k_arch,
bfd_z8k_arch,
+ bfd_ns32k_arch,
#endif
0
};
*/
void
-DEFUN_VOID(bfd_arch_init)
+bfd_arch_init ()
{
- void (**ptable) PARAMS ((void));
- for (ptable = archures_init_table;
- *ptable ;
- ptable++)
- {
- (*ptable)();
- }
+ void (*const *ptable) PARAMS ((void));
+ for (ptable = archures_init_table; *ptable ; ptable++)
+ (*ptable)();
}
Link the architecture info structure @var{ptr} into the list.
*/
-void DEFUN(bfd_arch_linkin,(ptr),
- bfd_arch_info_type *ptr)
+void
+bfd_arch_linkin (ptr)
+ bfd_arch_info_type *ptr;
{
ptr->next = bfd_arch_info_list;
bfd_arch_info_list = ptr;
*/
CONST bfd_arch_info_type *
-DEFUN(bfd_default_compatible,(a,b),
- CONST bfd_arch_info_type *a AND
- CONST bfd_arch_info_type *b)
+bfd_default_compatible (a,b)
+ CONST bfd_arch_info_type *a;
+ CONST bfd_arch_info_type *b;
{
if(a->arch != b->arch) return NULL;
*/
boolean
-DEFUN(bfd_default_scan,(info, string),
-CONST struct bfd_arch_info *info AND
-CONST char *string)
+bfd_default_scan (info, string)
+ CONST struct bfd_arch_info *info;
+ CONST char *string;
{
CONST char *ptr_src;
CONST char *ptr_tst;
*/
bfd_arch_info_type *
-DEFUN(bfd_get_arch_info,(abfd),
-bfd *abfd)
+bfd_get_arch_info (abfd)
+ bfd *abfd;
{
return abfd->arch_info;
}
*/
bfd_arch_info_type *
-DEFUN(bfd_lookup_arch,(arch, machine),
-enum bfd_architecture arch AND
-long machine)
+bfd_lookup_arch (arch, machine)
+ enum bfd_architecture arch;
+ long machine;
{
bfd_arch_info_type *ap;
bfd_check_init();
*/
CONST char *
-DEFUN(bfd_printable_arch_mach,(arch, machine),
- enum bfd_architecture arch AND
- unsigned long machine)
+bfd_printable_arch_mach (arch, machine)
+ enum bfd_architecture arch;
+ unsigned long machine;
{
bfd_arch_info_type *ap = bfd_lookup_arch(arch, machine);
if(ap) return ap->printable_name;