Path from Roland McGrath <roland@baalperazim.frob.com>
authorNick Clifton <nickc@redhat.com>
Tue, 24 Aug 1999 15:16:53 +0000 (15:16 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 24 Aug 1999 15:16:53 +0000 (15:16 +0000)
Added arm-netbsd target.

bfd/ChangeLog
bfd/Makefile.am
bfd/Makefile.in
bfd/armnetbsd.c [new file with mode: 0644]
bfd/config.bfd
bfd/configure
bfd/configure.in
bfd/targets.c

index 140e7e5..e5a9e16 100644 (file)
@@ -1,3 +1,20 @@
+1999-08-24  Nick Clifton  <nickc@cygnus.com>
+
+       From a patch submitted by Roland McGrath  <roland@baalperazim.frob.com>
+
+       * config.bfd (arm-*-netbsd*): New target.
+       * configure.in (armnetbsd_vec): New target vector.
+       * configure: Regenerate
+       * targets.c (bfd_target_vector): Add &armnetbsd_vec.
+
+       * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
+       (ALL_MACHINES_CFILES): Add armnetbsd.c.
+       (armnetbsd.lo): New rule with deps.
+       * Makefile.in: Regenerate.
+       
+       * armnetbsd.c: New file:  Definitions specific to arm-netbsd
+       target. 
+
 Tue Aug 24 00:25:58 1999  Jeffrey A Law  (law@cygnus.com)
 
        * som.c (som_slurp_symbol_table): Fix typo in comment.
index 1dbb5d3..c74be34 100644 (file)
@@ -114,6 +114,7 @@ BFD32_BACKENDS = \
        aout-tic30.lo \
        aout0.lo \
        aout32.lo \
+       armnetbsd.lo \
        bout.lo \
        cf-i386lynx.lo \
        cf-m68klynx.lo \
@@ -236,6 +237,7 @@ BFD32_BACKENDS_CFILES = \
        aout-tic30.c \
        aout0.c \
        aout32.c \
+       armnetbsd.c \
        bout.c \
        cf-i386lynx.c \
        cf-m68klynx.c \
@@ -723,6 +725,9 @@ aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
 aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
   $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
   $(INCDIR)/aout/ar.h
+armnetbsd.lo: armnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+  aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+  $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
 bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \
   $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
 cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \
index b2202c8..52f9c4d 100644 (file)
@@ -233,6 +233,7 @@ BFD32_BACKENDS = \
        aout-tic30.lo \
        aout0.lo \
        aout32.lo \
+       armnetbsd.lo \
        bout.lo \
        cf-i386lynx.lo \
        cf-m68klynx.lo \
@@ -356,6 +357,7 @@ BFD32_BACKENDS_CFILES = \
        aout-tic30.c \
        aout0.c \
        aout32.c \
+       armnetbsd.c \
        bout.c \
        cf-i386lynx.c \
        cf-m68klynx.c \
@@ -1253,6 +1255,9 @@ aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \
 aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \
   $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
   $(INCDIR)/aout/ar.h
+armnetbsd.lo: armnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \
+  aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+  $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
 bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \
   $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h
 cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \
diff --git a/bfd/armnetbsd.c b/bfd/armnetbsd.c
new file mode 100644 (file)
index 0000000..3e6ee47
--- /dev/null
@@ -0,0 +1,49 @@
+/* BFD back-end for NetBSD/ARM a.out-ish binaries.
+   Copyright (C) 1999 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define        BYTES_IN_WORD           4
+#undef TARGET_IS_BIG_ENDIAN_P
+
+#define        TARGET_PAGE_SIZE        4096
+#define        SEGMENT_SIZE            TARGET_PAGE_SIZE
+
+#define        DEFAULT_ARCH            bfd_arch_arm
+#define        DEFAULT_MID             M_ARM6_NETBSD
+/*#define MACHTYPE_OK(mtype) ((mtype) == M_ARM6_NETBSD)*/
+
+#define MY(OP)                         CAT (armnetbsd_, OP)
+/* This needs to start with a.out so GDB knows it is an a.out variant.  */
+#define TARGETNAME             "a.out-arm-netbsd"
+
+#if 0
+#define NAME(x,y) CAT3(aoutarm,_32_,y)
+
+#define aoutarm_32_get_section_contents aout_32_get_section_contents
+
+#define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup
+
+#include "bfd.h"               /* To ensure following declaration is OK */
+
+CONST struct reloc_howto_struct *
+MY_bfd_reloc_type_lookup
+  PARAMS ((bfd * abfd AND
+         bfd_reloc_code_real_type code));
+#endif
+
+#include "netbsd.h"
index 600f843..1f948aa 100644 (file)
@@ -84,6 +84,10 @@ case "${targ}" in
     targ_selvecs=bfd_elf32_bigarc_vec
     ;;
 
+  arm-*-netbsd*)
+    targ_defvec=armnetbsd_vec
+    targ_underscore=yes
+    ;;
   arm-*-riscix*)
     targ_defvec=riscix_vec
     ;;
index ea56b99..e9d0c3a 100755 (executable)
@@ -5366,6 +5366,7 @@ do
     a_out_adobe_vec)           tb="$tb aout-adobe.lo aout32.lo" ;;
     armcoff_little_vec)                tb="$tb coff-arm.lo cofflink.lo " ;;
     armcoff_big_vec)           tb="$tb coff-arm.lo cofflink.lo " ;;
+    armnetbsd_vec)             tb="$tb armnetbsd.lo aout32.lo" ;;
     armpe_little_vec)          tb="$tb pe-arm.lo cofflink.lo " ;;
     armpe_big_vec)             tb="$tb pe-arm.lo cofflink.lo " ;;
     armpei_little_vec)         tb="$tb pei-arm.lo cofflink.lo " ;;
index 9a1e3fa..c567473 100644 (file)
@@ -414,6 +414,7 @@ do
     a_out_adobe_vec)           tb="$tb aout-adobe.lo aout32.lo" ;;
     armcoff_little_vec)                tb="$tb coff-arm.lo cofflink.lo " ;;
     armcoff_big_vec)           tb="$tb coff-arm.lo cofflink.lo " ;;
+    armnetbsd_vec)             tb="$tb armnetbsd.lo aout32.lo" ;;
     armpe_little_vec)          tb="$tb pe-arm.lo cofflink.lo " ;;
     armpe_big_vec)             tb="$tb pe-arm.lo cofflink.lo " ;;
     armpei_little_vec)         tb="$tb pei-arm.lo cofflink.lo " ;;
index 8600f98..7241370 100644 (file)
@@ -494,6 +494,7 @@ extern const bfd_target aout0_big_vec;
 extern const bfd_target apollocoff_vec;
 extern const bfd_target armcoff_little_vec;
 extern const bfd_target armcoff_big_vec;
+extern const bfd_target armnetbsd_vec;
 extern const bfd_target armpe_little_vec;
 extern const bfd_target armpe_big_vec;
 extern const bfd_target armpei_little_vec;
@@ -776,6 +777,7 @@ const bfd_target * const bfd_target_vector[] = {
        &i386pei_vec,
        &armcoff_little_vec,
        &armcoff_big_vec,
+       &armnetbsd_vec,
        &armpe_little_vec,
        &armpe_big_vec,
        &armpei_little_vec,