summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/vax
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-05-11 20:27:20 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-05-11 20:27:20 +0000
commit33b4bcab9ca33db37b69162dc965c9ac04921b93 (patch)
treeb73a13654c97c581bf68daa700c231c5000f2114 /gnu/usr.bin/ld/vax
parent2dfd9372f29bb26e55b482d80e77f7189450c11c (diff)
Make usable as a cross-linker
Diffstat (limited to 'gnu/usr.bin/ld/vax')
-rw-r--r--gnu/usr.bin/ld/vax/md.c9
-rw-r--r--gnu/usr.bin/ld/vax/md.h15
2 files changed, 14 insertions, 10 deletions
diff --git a/gnu/usr.bin/ld/vax/md.c b/gnu/usr.bin/ld/vax/md.c
index a5e5b461186..31c625078b7 100644
--- a/gnu/usr.bin/ld/vax/md.c
+++ b/gnu/usr.bin/ld/vax/md.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md.c,v 1.2 1996/09/30 22:29:32 deraadt Exp $ */
+/* $OpenBSD: md.c,v 1.3 1998/05/11 20:27:17 niklas Exp $ */
/* $NetBSD: md.c,v 1.1 1995/10/19 13:10:19 ragge Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -37,6 +37,7 @@
#include <sys/types.h>
#include <err.h>
#include <fcntl.h>
+#include <ranlib.h>
#include <a.out.h>
#include <stab.h>
#include <string.h>
@@ -249,15 +250,15 @@ int magic, flags;
if (oldmagic || magic == QMAGIC)
hp->a_midmag = magic;
else
- N_SETMAGIC((*hp), magic, MID_I386, flags);
+ N_SETMAGIC((*hp), magic, MID_VAX, flags);
#endif
#ifdef FreeBSD
if (oldmagic)
hp->a_midmag = magic;
else if (netzmagic)
- N_SETMAGIC_NET((*hp), magic, MID_I386, flags);
+ N_SETMAGIC_NET((*hp), magic, MID_VAX, flags);
else
- N_SETMAGIC((*hp), magic, MID_I386, flags);
+ N_SETMAGIC((*hp), magic, MID_VAX, flags);
#endif
/* TEXT_START depends on the value of outheader.a_entry. */
diff --git a/gnu/usr.bin/ld/vax/md.h b/gnu/usr.bin/ld/vax/md.h
index 65bf5112a45..8328f9182d9 100644
--- a/gnu/usr.bin/ld/vax/md.h
+++ b/gnu/usr.bin/ld/vax/md.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: md.h,v 1.2 1996/09/30 22:29:32 deraadt Exp $ */
+/* $OpenBSD: md.h,v 1.3 1998/05/11 20:27:19 niklas Exp $ */
/* $NetBSD: md.h,v 1.1 1995/10/19 13:10:20 ragge Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -36,7 +36,10 @@
#define NEED_SWAP
#endif
-#define MAX_ALIGNMENT (sizeof (long))
+#undef __LDPGSZ
+#include <sys/arch/vax/include/exec.h>
+
+#define MAX_ALIGNMENT 4 /* (sizeof (long)) */
#if defined(__NetBSD__) || defined(__OpenBSD__)
#define PAGSIZ __LDPGSZ
@@ -49,13 +52,13 @@
#define N_SET_FLAG(ex,f) (oldmagic || N_GETMAGIC(ex)==QMAGIC ? (0) : \
N_SETMAGIC(ex, \
N_GETMAGIC(ex), \
- MID_MACHINE, \
+ MID_VAX, \
N_GETFLAG(ex)|(f)))
#define N_IS_DYNAMIC(ex) ((N_GETFLAG(ex) & EX_DYNAMIC))
#define N_BADMID(ex) \
- (N_GETMID(ex) != 0 && N_GETMID(ex) != MID_MACHINE)
+ (N_GETMID(ex) != 0 && N_GETMID(ex) != MID_VAX)
#endif
@@ -67,11 +70,11 @@
(netzmagic == 0 ? \
N_SETMAGIC(ex, \
N_GETMAGIC(ex), \
- MID_MACHINE, \
+ MID_VAX, \
N_GETFLAG(ex)|(f)) : \
N_SETMAGIC_NET(ex, \
N_GETMAGIC_NET(ex), \
- MID_MACHINE, \
+ MID_VAX, \
N_GETFLAG_NET(ex)|(f)) ))
#define N_IS_DYNAMIC(ex) ((N_GETMAGIC_NET(ex) == ZMAGIC) ? \