adapt for changes to kern/exec_elf32.c
This commit is contained in:
parent
24082a2293
commit
714de0452f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: freebsd_exec_elf32.c,v 1.11 2003/06/29 22:29:16 fvdl Exp $ */
|
||||
/* $NetBSD: freebsd_exec_elf32.c,v 1.12 2003/10/31 14:04:35 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994 Christopher G. Demetriou
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_elf32.c,v 1.11 2003/06/29 22:29:16 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_elf32.c,v 1.12 2003/10/31 14:04:35 drochner Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -115,12 +115,11 @@ ELFNAME2(freebsd,probe)(p, epp, veh, itp, pos)
|
||||
free(ph, M_TEMP);
|
||||
}
|
||||
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
if ((error = emul_find_interp(p, epp->ep_esch->es_emul->e_path,
|
||||
itp)))
|
||||
return error;
|
||||
}
|
||||
*pos = ELF_NO_ADDR;
|
||||
#ifdef DEBUG_FREEBSD_ELF
|
||||
printf("freebsd_elf32_probe: returning 0\n");
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ibcs2_exec_elf32.c,v 1.6 2003/06/29 22:29:20 fvdl Exp $ */
|
||||
/* $NetBSD: ibcs2_exec_elf32.c,v 1.7 2003/10/31 14:04:35 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1998 Scott Bartram
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_elf32.c,v 1.6 2003/06/29 22:29:20 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_elf32.c,v 1.7 2003/10/31 14:04:35 drochner Exp $");
|
||||
|
||||
#define ELFSIZE 32
|
||||
|
||||
@ -132,10 +132,9 @@ ibcs2_elf32_probe(p, epp, eh, itp, pos)
|
||||
if ((error = ibcs2_elf32_signature(p, epp, eh)) != 0)
|
||||
return error;
|
||||
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
if ((error = emul_find_interp(p, epp->ep_esch->es_emul->e_path, itp)))
|
||||
return error;
|
||||
}
|
||||
*pos = ELF32_NO_ADDR;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: linux_exec_elf32.c,v 1.65 2003/10/27 07:07:34 chs Exp $ */
|
||||
/* $NetBSD: linux_exec_elf32.c,v 1.66 2003/10/31 14:04:36 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.65 2003/10/27 07:07:34 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.66 2003/10/31 14:04:36 drochner Exp $");
|
||||
|
||||
#ifndef ELFSIZE
|
||||
/* XXX should die */
|
||||
@ -294,7 +294,7 @@ ELFNAME2(linux,signature)(p, epp, eh, itp)
|
||||
}
|
||||
|
||||
/* Check for certain intepreter names. */
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
if (!strncmp(itp, "/lib/ld-linux", 13) ||
|
||||
!strncmp(itp, "/lib/ld.so.", 11))
|
||||
error = 0;
|
||||
@ -329,12 +329,11 @@ ELFNAME2(linux,probe)(p, epp, eh, itp, pos)
|
||||
1)
|
||||
return error;
|
||||
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
if ((error = emul_find_interp(p, epp->ep_esch->es_emul->e_path,
|
||||
itp)))
|
||||
return (error);
|
||||
}
|
||||
*pos = ELF_NO_ADDR;
|
||||
DPRINTF(("linux_probe: returning 0\n"));
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netbsd32_exec_elf32.c,v 1.20 2003/10/13 14:22:20 agc Exp $ */
|
||||
/* $NetBSD: netbsd32_exec_elf32.c,v 1.21 2003/10/31 14:04:36 drochner Exp $ */
|
||||
/* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
|
||||
|
||||
/*
|
||||
@ -59,7 +59,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.20 2003/10/13 14:22:20 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.21 2003/10/31 14:04:36 drochner Exp $");
|
||||
|
||||
#define ELFSIZE 32
|
||||
|
||||
@ -105,7 +105,7 @@ ELFNAME2(netbsd32,probe_noteless)(struct proc *p, struct exec_package *epp,
|
||||
{
|
||||
int error;
|
||||
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
/* Translate interpreter name if needed */
|
||||
if ((error = emul_find_interp(p, epp->ep_esch->es_emul->e_path,
|
||||
itp)) != 0)
|
||||
@ -114,7 +114,9 @@ ELFNAME2(netbsd32,probe_noteless)(struct proc *p, struct exec_package *epp,
|
||||
epp->ep_flags |= EXEC_32;
|
||||
epp->ep_vm_minaddr = VM_MIN_ADDRESS;
|
||||
epp->ep_vm_maxaddr = USRSTACK32;
|
||||
*pos = ELFDEFNNAME(NO_ADDR);
|
||||
#ifdef ELF_INTERP_NON_RELOCATABLE
|
||||
*pos = ELF_LINK_ADDR;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_exec.h,v 1.22 2003/06/29 22:29:46 fvdl Exp $ */
|
||||
/* $NetBSD: svr4_exec.h,v 1.23 2003/10/31 14:04:36 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -68,10 +68,6 @@
|
||||
#define SVR4_INTERP_ADDR 0x10000000
|
||||
#endif
|
||||
|
||||
#ifndef SVR4_INTERP_ADDR
|
||||
# define SVR4_INTERP_ADDR ELFDEFNNAME(NO_ADDR)
|
||||
#endif
|
||||
|
||||
extern const struct emul emul_svr4;
|
||||
|
||||
void svr4_setregs __P((struct lwp *, struct exec_package *, u_long));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_exec_elf32.c,v 1.7 2003/06/29 22:29:46 fvdl Exp $ */
|
||||
/* $NetBSD: svr4_exec_elf32.c,v 1.8 2003/10/31 14:04:36 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_exec_elf32.c,v 1.7 2003/06/29 22:29:46 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_exec_elf32.c,v 1.8 2003/10/31 14:04:36 drochner Exp $");
|
||||
|
||||
#define ELFSIZE 32 /* XXX should die */
|
||||
|
||||
@ -71,10 +71,12 @@ svr4_elf32_probe(p, epp, eh, itp, pos)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
if ((error = emul_find_interp(p, epp->ep_esch->es_emul->e_path, itp)))
|
||||
return error;
|
||||
}
|
||||
#ifdef SVR4_INTERP_ADDR
|
||||
*pos = SVR4_INTERP_ADDR;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_exec_elf64.c,v 1.8 2003/06/29 22:29:46 fvdl Exp $ */
|
||||
/* $NetBSD: svr4_exec_elf64.c,v 1.9 2003/10/31 14:04:36 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_exec_elf64.c,v 1.8 2003/06/29 22:29:46 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_exec_elf64.c,v 1.9 2003/10/31 14:04:36 drochner Exp $");
|
||||
|
||||
#define ELFSIZE 64 /* XXX should die */
|
||||
|
||||
@ -71,10 +71,12 @@ svr4_elf64_probe(p, epp, eh, itp, pos)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
if ((error = emul_find_interp(p, epp->ep_esch->es_emul->e_path, itp)))
|
||||
return error;
|
||||
}
|
||||
#ifdef SVR4_INTERP_ADDR
|
||||
*pos = SVR4_INTERP_ADDR;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_32_exec.h,v 1.7 2003/06/29 22:29:50 fvdl Exp $ */
|
||||
/* $NetBSD: svr4_32_exec.h,v 1.8 2003/10/31 14:04:36 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -67,10 +67,6 @@ int svr4_32_copyargs __P((struct proc *, struct exec_package *, struct ps_string
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SVR4_32_INTERP_ADDR
|
||||
# define SVR4_32_INTERP_ADDR ELFDEFNNAME(NO_ADDR)
|
||||
#endif
|
||||
|
||||
extern const struct emul emul_svr4_32;
|
||||
|
||||
void svr4_32_setregs __P((struct lwp *, struct exec_package *, u_long));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: svr4_32_exec_elf32.c,v 1.12 2003/06/29 22:29:50 fvdl Exp $ */
|
||||
/* $NetBSD: svr4_32_exec_elf32.c,v 1.13 2003/10/31 14:04:36 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.12 2003/06/29 22:29:50 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_exec_elf32.c,v 1.13 2003/10/31 14:04:36 drochner Exp $");
|
||||
|
||||
#define ELFSIZE 32 /* XXX should die */
|
||||
|
||||
@ -284,11 +284,13 @@ svr4_32_elf32_probe(p, epp, eh, itp, pos)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (itp[0]) {
|
||||
if (itp) {
|
||||
if ((error = emul_find_interp(p, epp->ep_esch->es_emul->e_path, itp)))
|
||||
return error;
|
||||
}
|
||||
epp->ep_flags |= EXEC_32;
|
||||
#ifdef SVR4_32_INTERP_ADDR
|
||||
*pos = SVR4_32_INTERP_ADDR;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user