]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
authorJ.T. Conklin <jtc@acorntoolworks.com>
Fri, 28 Oct 1994 18:11:15 +0000 (18:11 +0000)
committerJ.T. Conklin <jtc@acorntoolworks.com>
Fri, 28 Oct 1994 18:11:15 +0000 (18:11 +0000)
* config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
* configure.in (m68knetbsd_vec): Added.
* targets.c (bfd_m68knetbsd_vec): Added.
* hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
* Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.

miscellaneous cleanup required by all netbsd targets, based on work
by Andrew Cagney <cagney@highland.com.au>:
* netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
  N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed.  Generic a.out
  definitions work.
* i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
  (MY(write_object_contents)): Use NetBSD's magic numbers

bfd/.Sanitize
bfd/ChangeLog
bfd/configure.in
bfd/hosts/.Sanitize
bfd/hosts/m68knbsd.h [new file with mode: 0644]
bfd/m68knetbsd.c [new file with mode: 0644]

index 7e997b579eab6591b018569db7dc384282636260..c6442d20d7ecb734d6ec4d2c49c7c3b0f20e93de 100644 (file)
@@ -168,6 +168,7 @@ liboasys.h
 linker.c
 lynx-core.c
 m68klynx.c
+m68knetbsd.c
 m88kmach3.c
 makefile.dos
 mipsbsd.c
index 414ef4076146f73137c7358a7dd80003f2097f63..99da14d6b0cf4bfa11ce753b4818b8c77ea0c569 100644 (file)
@@ -1,3 +1,20 @@
+Fri Oct 28 10:08:41 1994  J.T. Conklin  (jtc@rtl.cygnus.com)
+
+        NetBSD/m68k support, based on work by mikeb@snow.datametrics.com: 
+       * config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
+       * configure.in (m68knetbsd_vec): Added.
+       * targets.c (bfd_m68knetbsd_vec): Added.
+       * hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
+       * Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.
+
+       miscellaneous cleanup required by all netbsd targets, based on work 
+       by Andrew Cagney <cagney@highland.com.au>:
+       * netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
+         N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed.  Generic a.out
+         definitions work.
+       * i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
+         (MY(write_object_contents)): Use NetBSD's magic numbers
+
 Thu Oct 27 16:59:52 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
 
        * libelf.h (struct bfd_elf_section_data): Add field dynindx.
index fdcc6b5eb0cab7193a897415b47b8d5801d92070..59633429aadf8b232fde01b3badad5dbf6b145b4 100644 (file)
@@ -49,7 +49,7 @@ all_targets=false
 
 for targ in $target $canon_targets
 do
-    bfd_target=`$srcdir/config.bfd $targ`
+    bfd_target=`${config_shell} $srcdir/config.bfd $targ`
 
     if [ "x$bfd_target" = "xall" ]; then
         all_targets=true
@@ -189,6 +189,7 @@ do
     m68kcoffun_vec)            tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
     m68klynx_aout_vec)         tb="$tb m68klynx.o lynx-core.o aout32.o stab-syms.o" ;;
     m68klynx_coff_vec)         tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o stab-syms.o" ;;
+    m68knetbsd_vec)            tb="$tb m68knetbsd.o aout32.o stab-syms.o" ;;
     m88kbcs_vec)               tb="$tb coff-m88k.o" ;;
     newsos3_vec)               tb="$tb newsos3.o aout32.o stab-syms.o" ;;
     nlm32_i386_vec)            tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
@@ -200,7 +201,7 @@ do
     ns32knetbsd_vec)           tb="$tb ns32knetbsd.o aout-ns32k.o stab-syms.o" ;;
     pc532machaout_vec)         tb="$tb pc532-mach.o aout-ns32k.o stab-syms.o" ;;
     rs6000coff_vec)            tb="$tb coff-rs6000.o" ;;
-    shcoff_vec)                        tb="$tb coff-sh.o reloc16.o" ;;
+    shcoff_vec)                        tb="$tb coff-sh.o cofflink.o" ;;
     som_vec)                   tb="$tb som.o" ;;
     sparclynx_aout_vec)                tb="$tb sparclynx.o lynx-core.o aout32.o stab-syms.o" ;;
     sparclynx_coff_vec)                tb="$tb cf-sparclynx.o lynx-core.o stab-syms.o" ;;
index 357e7e93232c8fe59c87aa46334fd1458a825dc1..5f5037f82cbba8aa0ac6fa8939f690069a17704b 100644 (file)
@@ -60,6 +60,7 @@ irix3.h
 irix4.h
 lynx.h
 m68klynx.h
+m68knbsd.h
 m68kv4.h
 m88kmach3.h
 miniframe.h
diff --git a/bfd/hosts/m68knbsd.h b/bfd/hosts/m68knbsd.h
new file mode 100644 (file)
index 0000000..9c9430d
--- /dev/null
@@ -0,0 +1,14 @@
+/* m68k hosts running NetBSD */
+
+#ifndef hosts_m68knbsd_h
+#define hosts_m68knbsd_h
+
+#include "hosts/nbsd.h"
+
+#define        HOST_MACHINE_ARCH       bfd_arch_m68k
+#define HOST_BIG_ENDIAN_P
+
+#define TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(core_bfd) \
+  ((core_bfd)->tdata.trad_core_data->u.u_sig)
+#define u_comm u_kproc.kp_proc.p_comm
+#endif
diff --git a/bfd/m68knetbsd.c b/bfd/m68knetbsd.c
new file mode 100644 (file)
index 0000000..c6e7fa4
--- /dev/null
@@ -0,0 +1,33 @@
+/* BFD back-end for NetBSD/m68k a.out-ish binaries.
+   Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+#define BYTES_IN_WORD  4
+#define TARGET_IS_BIG_ENDIAN_P
+
+#define        PAGE_SIZE       4096
+#define        SEGMENT_SIZE    4096
+
+#define DEFAULT_ARCH   bfd_arch_m68k
+#define MACHTYPE_OK(mtype) ((mtype) == M_68020 || (mtype) == M_68K_NETBSD || (mtype) == M_UNKNOWN)
+
+#define MY(OP) CAT(m68knetbsd_,OP)
+/* This needs to start with a.out so GDB knows it is an a.out variant.  */
+#define TARGETNAME "a.out-m68k-netbsd"
+
+#include "netbsd.h"