diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-10-25 10:30:21 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-11-01 10:45:30 +0100 |
commit | c38a10bca63e4fea5573dccf4caa9d17e325a6d8 (patch) | |
tree | 5ec79a755d436d255f12c5214db9637de5128772 /exec/hostarch.c | |
parent | 87c02e03c4ae40e5e96792f67d7aad09b7f50935 (diff) |
exec: Remove the remaining BFD related bits
* exec/Makefile: Remove commented out lines related to BFD.
* exec/hostarch.c: Remove all BFD related code.
* exec/main.c: Likewise.
Diffstat (limited to 'exec/hostarch.c')
-rw-r--r-- | exec/hostarch.c | 99 |
1 files changed, 1 insertions, 98 deletions
diff --git a/exec/hostarch.c b/exec/hostarch.c index b37adb97..a3b93305 100644 --- a/exec/hostarch.c +++ b/exec/hostarch.c @@ -1,4 +1,4 @@ -/* Determine the BFD and ELF architecture and machine flavor +/* Determine the ELF architecture and machine flavor from a Mach host port. Used by the exec and core servers. Copyright (C) 1992,93,95,96,99,2000,02 Free Software Foundation, Inc. Written by Roland McGrath. @@ -87,100 +87,3 @@ elf_machine_matches_host (ElfW(Half) e_machine) return 0; } - -#ifdef BFD -#include <bfd.h> - -error_t -bfd_mach_host_arch_mach (host_t host, - enum bfd_architecture *arch, - long int *machine) -{ - error_t err; - struct host_basic_info hostinfo; - mach_msg_type_number_t hostinfocnt = HOST_BASIC_INFO_COUNT; - - err = host_info (host, HOST_BASIC_INFO, (natural_t *) &hostinfo, &hostinfocnt); - if (err) - return err; - - *machine = hostinfo.cpu_subtype; - *e_machine = EM_NONE; - switch (hostinfo.cpu_type) - { - case CPU_TYPE_MC68020: - *arch = bfd_arch_m68k; - *machine = 68020; - *e_machine = EM_68K; - break; - case CPU_TYPE_MC68030: - *arch = bfd_arch_m68k; - *machine = 68030; - *e_machine = EM_68K; - break; - case CPU_TYPE_MC68040: - *arch = bfd_arch_m68k; - *machine = 68040; - *e_machine = EM_68K; - break; - - case CPU_TYPE_NS32032: - *arch = bfd_arch_ns32k; - *machine = 32032; - break; - case CPU_TYPE_NS32332: - *arch = bfd_arch_ns32k; - *machine = 32332; - break; - case CPU_TYPE_NS32532: - *arch = bfd_arch_ns32k; - *machine = 32532; - break; - - case CPU_TYPE_ROMP: - *arch = bfd_arch_romp; - break; - - case CPU_TYPE_I860: - *arch = bfd_arch_i860; - *e_machine = EM_860; - break; - - case CPU_TYPE_MIPS: - *arch = bfd_arch_mips; - *e_machine = EM_MIPS; - break; - - case CPU_TYPE_VAX: - *arch = bfd_arch_vax; - break; - - case CPU_TYPE_MC88000: - *arch = bfd_arch_m88k; - *e_machine = EM_88K; - break; - - case CPU_TYPE_SPARC: - *arch = bfd_arch_sparc; - *e_machine = EM_SPARC; - break; - - case CPU_TYPE_I386: - *arch = bfd_arch_i386; - *e_machine = EM_386; - break; - -#ifdef CPU_TYPE_ALPHA - case CPU_TYPE_ALPHA: - *arch = bfd_arch_alpha; - break; -#endif - - default: - return ENOEXEC; - } - - return 0; -} - -#endif /* BFD */ |