Provide default definition of MACHTYPE_OK using DEFAULT_MID,

and do the N_SET_MACHTYPE thing using DEFAULT_ARCH.  Both of
the DEFAULT_* definitions come from the including C file.
This commit is contained in:
gwr 1997-09-24 18:13:03 +00:00
parent dfe47bfbbb
commit b6c526b702

21
gnu/dist/bfd/netbsd.h vendored
View File

@ -18,6 +18,11 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Check for our machine type (part of magic number). */
#ifndef MACHTYPE_OK
#define MACHTYPE_OK(m) ((m) == DEFAULT_MID || (m) == M_UNKNOWN)
#endif
/* This is the normal load address for executables. */
#define TEXT_START_ADDR TARGET_PAGE_SIZE
@ -93,20 +98,8 @@ MY(write_object_contents) (abfd)
/* Magic number, maestro, please! */
switch (bfd_get_arch(abfd)) {
case bfd_arch_m68k:
if (strcmp (abfd->xvec->name, "a.out-m68k4k-netbsd") == 0)
N_SET_MACHTYPE(*execp, M_68K4K_NETBSD);
else
N_SET_MACHTYPE(*execp, M_68K_NETBSD);
break;
case bfd_arch_sparc:
N_SET_MACHTYPE(*execp, M_SPARC_NETBSD);
break;
case bfd_arch_i386:
N_SET_MACHTYPE(*execp, M_386_NETBSD);
break;
case bfd_arch_ns32k:
N_SET_MACHTYPE(*execp, M_532_NETBSD);
case DEFAULT_ARCH:
N_SET_MACHTYPE(*execp, DEFAULT_MID);
break;
default:
N_SET_MACHTYPE(*execp, M_UNKNOWN);