From 9287cd69a35da0368dc0458c1bfbb512e8db7244 Mon Sep 17 00:00:00 2001 From: gwr Date: Wed, 24 Sep 1997 18:39:10 +0000 Subject: [PATCH] Define DEFAULT_ARCH, DEFAULT_MID for netbsd.h --- gnu/dist/bfd/i386netbsd.c | 2 +- gnu/dist/bfd/m68k4knetbsd.c | 7 ++----- gnu/dist/bfd/m68knetbsd.c | 8 ++++---- gnu/dist/bfd/ns32knetbsd.c | 2 +- gnu/dist/bfd/sparcnetbsd.c | 2 +- gnu/dist/bfd/vaxnetbsd.c | 33 +++++++++++++++++++++++++++++++++ 6 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 gnu/dist/bfd/vaxnetbsd.c diff --git a/gnu/dist/bfd/i386netbsd.c b/gnu/dist/bfd/i386netbsd.c index 32feaa70c94e..981bd53df62b 100644 --- a/gnu/dist/bfd/i386netbsd.c +++ b/gnu/dist/bfd/i386netbsd.c @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SEGMENT_SIZE TARGET_PAGE_SIZE #define DEFAULT_ARCH bfd_arch_i386 -#define MACHTYPE_OK(mtype) ((mtype) == M_386_NETBSD || (mtype) == M_UNKNOWN) +#define DEFAULT_MID M_386_NETBSD #define MY(OP) CAT(i386netbsd_,OP) /* This needs to start with a.out so GDB knows it is an a.out variant. */ diff --git a/gnu/dist/bfd/m68k4knetbsd.c b/gnu/dist/bfd/m68k4knetbsd.c index c1ecb434425b..b992bf75f319 100644 --- a/gnu/dist/bfd/m68k4knetbsd.c +++ b/gnu/dist/bfd/m68k4knetbsd.c @@ -20,13 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define BYTES_IN_WORD 4 #define TARGET_IS_BIG_ENDIAN_P -#define TARGET_PAGE_SIZE 4096 -#define SEGMENT_SIZE 4096 +#define TARGET_PAGE_SIZE 0x1000 #define DEFAULT_ARCH bfd_arch_m68k -#define MACHTYPE_OK(mtype) \ - ((mtype) == M_68020 || (mtype) == M_68K_NETBSD || (mtype) == M_68K4K_NETBSD \ - || (mtype) == M_UNKNOWN) +#define DEFAULT_MID M_68K4K_NETBSD #define MY(OP) CAT(m68k4knetbsd_,OP) /* This needs to start with a.out so GDB knows it is an a.out variant. */ diff --git a/gnu/dist/bfd/m68knetbsd.c b/gnu/dist/bfd/m68knetbsd.c index c543eb34139b..66b94a45306a 100644 --- a/gnu/dist/bfd/m68knetbsd.c +++ b/gnu/dist/bfd/m68knetbsd.c @@ -20,12 +20,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define BYTES_IN_WORD 4 #define TARGET_IS_BIG_ENDIAN_P -#define TARGET_PAGE_SIZE 0x2000 +/* Our m68k ports use either 4K or 8K pages, but object files always + assume 8K page alignment so they will work on all m68k machines. */ +#define TARGET_PAGE_SIZE 0x2000 #define DEFAULT_ARCH bfd_arch_m68k -#define MACHTYPE_OK(mtype) \ - ((mtype) == M_68020 || (mtype) == M_68K_NETBSD || (mtype) == M_68K4K_NETBSD \ - || (mtype) == M_UNKNOWN) +#define DEFAULT_MID M_68K_NETBSD #define MY(OP) CAT(m68knetbsd_,OP) /* This needs to start with a.out so GDB knows it is an a.out variant. */ diff --git a/gnu/dist/bfd/ns32knetbsd.c b/gnu/dist/bfd/ns32knetbsd.c index 3e3f08a9e58d..8b5d567835f8 100644 --- a/gnu/dist/bfd/ns32knetbsd.c +++ b/gnu/dist/bfd/ns32knetbsd.c @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SEGMENT_SIZE 4096 #define DEFAULT_ARCH bfd_arch_ns32k -#define MACHTYPE_OK(mtype) ((mtype) == M_532_NETBSD || (mtype) == M_UNKNOWN) +#define DEFAULT_MID M_532_NETBSD #define MY(OP) CAT(pc532netbsd_,OP) diff --git a/gnu/dist/bfd/sparcnetbsd.c b/gnu/dist/bfd/sparcnetbsd.c index b5b2bd0e0fad..c8f62288d5bd 100644 --- a/gnu/dist/bfd/sparcnetbsd.c +++ b/gnu/dist/bfd/sparcnetbsd.c @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define TARGET_PAGE_SIZE 0x2000 #define DEFAULT_ARCH bfd_arch_sparc -#define MACHTYPE_OK(mtype) ((mtype) == M_SPARC_NETBSD || (mtype) == M_UNKNOWN) +#define DEFAULT_MID M_SPARC_NETBSD #define MY(OP) CAT(sparcnetbsd_,OP) /* This needs to start with a.out so GDB knows it is an a.out variant. */ diff --git a/gnu/dist/bfd/vaxnetbsd.c b/gnu/dist/bfd/vaxnetbsd.c new file mode 100644 index 000000000000..869e9451076c --- /dev/null +++ b/gnu/dist/bfd/vaxnetbsd.c @@ -0,0 +1,33 @@ +/* BFD back-end for NetBSD/VAX 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., 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 1024 +#define SEGMENT_SIZE TARGET_PAGE_SIZE + +#define DEFAULT_ARCH bfd_arch_vax +#define DEFAULT_MID M_VAX + +#define MY(OP) CAT(vaxnetbsd_,OP) +/* This needs to start with a.out so GDB knows it is an a.out variant. */ +#define TARGETNAME "a.out-vax-netbsd" + +#include "netbsd.h"