commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 22/26: exec: Remove the remaining BFD related bits


From: Samuel Thibault
Subject: [hurd] 22/26: exec: Remove the remaining BFD related bits
Date: Sat, 02 Nov 2013 14:44:46 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit c38a10bca63e4fea5573dccf4caa9d17e325a6d8
Author: Justus Winter <address@hidden>
Date:   Fri Oct 25 10:30:21 2013 +0200

    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.
---
 exec/Makefile   |    3 --
 exec/hostarch.c |   99 +------------------------------------------------------
 exec/main.c     |   19 -----------
 3 files changed, 1 insertion(+), 120 deletions(-)

diff --git a/exec/Makefile b/exec/Makefile
index 890ee4b..3ef742d 100644
--- a/exec/Makefile
+++ b/exec/Makefile
@@ -26,7 +26,6 @@ OBJS = main.o hostarch.o exec.o hashexec.o \
 
 target = exec
 #targets = exec exec.static
-#OTHERLIBS = -lbfd -liberty
 HURDLIBS = trivfs fshelp iohelp ports ihash shouldbeinlibc
 OTHERLIBS = -lpthread
 
@@ -34,6 +33,4 @@ exec-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
 
 include ../Makeconf
 
-CPPFLAGS += # -DBFD
-
 exec.static exec: $(OBJS) $(library_deps)
diff --git a/exec/hostarch.c b/exec/hostarch.c
index b37adb9..a3b9330 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 */
diff --git a/exec/main.c b/exec/main.c
index d5d6882..d23cc12 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -29,15 +29,6 @@
 
 const char *argp_program_version = STANDARD_HURD_VERSION (exec);
 
-#ifdef BFD
-bfd_arch_info_type host_bfd_arch_info;
-bfd host_bfd = { arch_info: &host_bfd_arch_info };
-extern error_t bfd_mach_host_arch_mach (host_t host,
-                                       enum bfd_architecture *bfd_arch,
-                                       long int *bfd_machine,
-                                       ElfW(Half) *elf_machine);
-#endif
-
 /* Trivfs hooks.  */
 int trivfs_fstype = FSTYPE_MISC;
 int trivfs_fsid = 0;
@@ -115,16 +106,6 @@ main (int argc, char **argv)
 
   save_argv = argv;
 
-#ifdef BFD
-  /* Put the Mach kernel's idea of what flavor of machine this is into the
-     fake BFD against which architecture compatibility checks are made.  */
-  err = bfd_mach_host_arch_mach (mach_host_self (),
-                                &host_bfd.arch_info->arch,
-                                &host_bfd.arch_info->mach);
-  if (err)
-    error (1, err, "Getting host architecture from Mach");
-#endif
-
   task_get_bootstrap_port (mach_task_self (), &bootstrap);
   if (bootstrap == MACH_PORT_NULL)
     error (2, 0, "Must be started as a translator");

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]