port this to sparc64.
This commit is contained in:
parent
c620771702
commit
5beff52e9c
@ -1,16 +1,22 @@
|
||||
# $NetBSD: Makefile,v 1.1 2000/12/08 23:05:47 jdolecek Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2001/07/18 16:53:34 mrg Exp $
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
.if ${MACHINE} == sparc64 && ${MACHINE_ARCH} == sparc64
|
||||
ELFSIZE=64
|
||||
.else
|
||||
ELFSIZE=32
|
||||
.endif
|
||||
|
||||
.PATH: $S/compat/svr4
|
||||
|
||||
CPPFLAGS+= -nostdinc -I$S -D_KERNEL -DEXEC_ELF32
|
||||
CPPFLAGS+= -nostdinc -I$S -D_KERNEL -DEXEC_ELF${ELFSIZE} -DELFSIZE=${ELFSIZE}
|
||||
|
||||
MKMAN= no
|
||||
|
||||
KMOD= exec_svr4_elf
|
||||
|
||||
SRCS= lkminit_exec.c
|
||||
SRCS+= svr4_exec_elf32.c
|
||||
SRCS+= svr4_exec_elf${ELFSIZE}.c
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lkminit_exec.c,v 1.2 2001/05/15 02:00:14 lukem Exp $ */
|
||||
/* $NetBSD: lkminit_exec.c,v 1.3 2001/07/18 16:53:34 mrg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -44,7 +44,9 @@
|
||||
#include <sys/lkm.h>
|
||||
|
||||
#include <machine/elf_machdep.h>
|
||||
#ifndef ELFSIZE
|
||||
#define ELFSIZE 32
|
||||
#endif
|
||||
#include <sys/exec_elf.h>
|
||||
|
||||
#include <compat/svr4/svr4_exec.h>
|
||||
@ -52,11 +54,19 @@
|
||||
int exec_svr4_elf_lkmentry __P((struct lkm_table *, int, int));
|
||||
|
||||
static struct execsw exec_svr4_elf =
|
||||
#if ELFSIZE == 32
|
||||
{ sizeof (Elf_Ehdr), exec_elf32_makecmds,
|
||||
{ ELFNAME2(svr4,probe) },
|
||||
NULL, EXECSW_PRIO_ANY,
|
||||
SVR4_AUX_ARGSIZ,
|
||||
svr4_copyargs, svr4_setregs }; /* SVR4 32bit ELF bins (not 64bit safe) */
|
||||
#else
|
||||
{ sizeof (Elf64_Ehdr), exec_elf64_makecmds,
|
||||
{ ELFNAME2(svr4,probe) },
|
||||
NULL, EXECSW_PRIO_ANY,
|
||||
SVR4_AUX_ARGSIZ64,
|
||||
svr4_copyargs64, svr4_setregs }; /* SVR4 64bit ELF bins (not 64bit safe) */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* declare the exec
|
||||
|
Loading…
Reference in New Issue
Block a user