es_arglen is now in units of bytes, update the emulations accordingly.

This commit is contained in:
chs 2017-02-12 21:02:19 +00:00
parent 7478335c60
commit f49c9159a2
9 changed files with 22 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.h,v 1.12 2014/02/09 16:41:42 chs Exp $ */
/* $NetBSD: linux_exec.h,v 1.13 2017/02/12 21:02:19 chs Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -48,7 +48,7 @@
* Alpha specific ELF defines.
*/
#define LINUX_ELF_AUX_ARGSIZ \
(howmany(sizeof(Aux64Info) * LINUX_ELF_AUX_ENTRIES, sizeof(char *)) + LINUX_RANDOM_BYTES)
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux64Info) + LINUX_RANDOM_BYTES)
#define linux_exec_setup_stack exec_setup_stack

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.h,v 1.9 2014/02/09 16:41:42 chs Exp $ */
/* $NetBSD: linux_exec.h,v 1.10 2017/02/12 21:02:19 chs Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
#define LINUX_MID_MACHINE LINUX_M_ARM
#define LINUX_ELF_AUX_ARGSIZ \
(howmany(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof(Elf32_Addr)) + LINUX_RANDOM_BYTES)
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES)
#define linux_exec_setup_stack exec_setup_stack

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.h,v 1.12 2014/02/09 16:41:42 chs Exp $ */
/* $NetBSD: linux_exec.h,v 1.13 2017/02/12 21:02:19 chs Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
#define LINUX_USRSTACK 0xC0000000
#define LINUX_ELF_AUX_ARGSIZ \
(howmany(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof(Elf32_Addr)) + LINUX_RANDOM_BYTES)
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES)
#define LINUX_DEBUGLINK_SIGNATURE

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.h,v 1.11 2014/02/09 16:41:42 chs Exp $ */
/* $NetBSD: linux_exec.h,v 1.12 2017/02/12 21:02:19 chs Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
#define LINUX_GCC_SIGNATURE 1
#define LINUX_ELF_AUX_ARGSIZ \
(howmany(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof(Elf32_Addr)) + LINUX_RANDOM_BYTES)
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES)
#define linux_exec_setup_stack exec_setup_stack

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.h,v 1.15 2014/02/09 16:41:42 chs Exp $ */
/* $NetBSD: linux_exec.h,v 1.16 2017/02/12 21:02:19 chs Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
#define LINUX_GCC_SIGNATURE 1
#define LINUX_ELF_AUX_ARGSIZ \
(howmany(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof(Elf32_Addr)) + LINUX_RANDOM_BYTES)
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES)
#define linux_exec_setup_stack exec_setup_stack

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.h,v 1.23 2014/02/09 16:41:42 chs Exp $ */
/* $NetBSD: linux_exec.h,v 1.24 2017/02/12 21:02:19 chs Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@ -81,7 +81,7 @@
* by PowerPC GNU ld.so).
*/
#define LINUX_ELF_AUX_ARGSIZ \
(howmany(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof(Elf32_Addr)) + LINUX_RANDOM_BYTES + 16)
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES + 16)
/* we have special powerpc ELF copyargs */
#define LINUX_MACHDEP_ELF_COPYARGS

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec.h,v 1.51 2014/02/21 07:53:53 maxv Exp $ */
/* $NetBSD: linux_exec.h,v 1.52 2017/02/12 21:02:20 chs Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
/* Defines for a.out executables */
#define LINUX_AOUT_HDR_SIZE (sizeof (struct exec))
#define LINUX_AOUT_AUX_ARGSIZ 2
#define LINUX_AOUT_AUX_ARGSIZ 8
#define LINUX_N_MAGIC(ep) ((ep)->a_midmag & 0xffff)
#define LINUX_N_MACHTYPE(ep) (((ep)->a_midmag >> 16) & 0xff)

View File

@ -1,4 +1,4 @@
/* $NetBSD: osf1_mod.c,v 1.4 2014/03/07 01:33:43 christos Exp $ */
/* $NetBSD: osf1_mod.c,v 1.5 2017/02/12 21:02:20 chs Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
#endif
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: osf1_mod.c,v 1.4 2014/03/07 01:33:43 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: osf1_mod.c,v 1.5 2017/02/12 21:02:20 chs Exp $");
#include <sys/param.h>
#include <sys/module.h>
@ -48,8 +48,9 @@ __KERNEL_RCSID(0, "$NetBSD: osf1_mod.c,v 1.4 2014/03/07 01:33:43 christos Exp $"
MODULE(MODULE_CLASS_EXEC, compat_osf1, "compat,exec_ecoff");
#define OSF1_ARGLEN howmany(OSF1_MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) + \
2 * (MAXPATHLEN + 1), sizeof (char *)) /* exec & loader names */
#define OSF1_ARGLEN \
(OSF1_MAX_AUX_ENTRIES * sizeof (struct osf1_auxv) + \
2 * (MAXPATHLEN + 1)) /* exec & loader names */
static struct execsw osf1_execsw = {
.es_hdrsz = ECOFF_HDR_SIZE,

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_32_exec.h,v 1.15 2015/11/26 13:15:34 martin Exp $ */
/* $NetBSD: svr4_32_exec.h,v 1.16 2017/02/12 21:02:20 chs Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -34,10 +34,9 @@
#undef SVR4_COMPAT_SOLARIS2
#ifdef SVR4_COMPAT_SOLARIS2
# define SVR4_32_AUX_ARGSIZ howmany((sizeof(Aux32Info) * 15) + 256, \
sizeof(netbsd32_charp))
# define SVR4_32_AUX_ARGSIZ (sizeof(Aux32Info) * 15 + 256)
#else
# define SVR4_32_AUX_ARGSIZ howmany(sizeof(Aux32Info) * 8, sizeof(netbsd32_charp))
# define SVR4_32_AUX_ARGSIZ (sizeof(Aux32Info) * 8)
#endif
int svr4_32_copyargs(struct lwp *, struct exec_package *, struct ps_strings *,