summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/ld/sparc/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/ld/sparc/md.c')
-rw-r--r--gnu/usr.bin/ld/sparc/md.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/usr.bin/ld/sparc/md.c b/gnu/usr.bin/ld/sparc/md.c
index 2fe093b..5424f15 100644
--- a/gnu/usr.bin/ld/sparc/md.c
+++ b/gnu/usr.bin/ld/sparc/md.c
@@ -1,5 +1,5 @@
/*
- * $Id: md.c,v 1.2 1993/10/27 00:56:17 pk Exp $
+ * $Id: md.c,v 1.3 1993/11/06 19:15:31 pk Exp $
*/
#include <sys/param.h>
@@ -148,6 +148,13 @@ md_init_header(hp, magic, flags)
struct exec *hp;
int magic, flags;
{
+#ifdef NetBSD
+ N_SETMAGIC((*hp), magic, MID_MACHINE, flags);
+
+ /* TEXT_START depends on the value of outheader.a_entry. */
+ if (!(link_mode & SHAREABLE)) /*WAS: if (entry_symbol) */
+ hp->a_entry = PAGSIZ;
+#else
hp->a_magic = magic;
hp->a_machtype = M_SPARC;
hp->a_toolversion = 1;
@@ -156,6 +163,7 @@ int magic, flags;
/* SunOS 4.1 N_TXTADDR depends on the value of outheader.a_entry. */
if (!(link_mode & SHAREABLE)) /*WAS: if (entry_symbol) */
hp->a_entry = N_PAGSIZ(*hp);
+#endif
}
/*
OpenPOWER on IntegriCloud