- LINUX_GO_RT0_SIGNATURE for compat_linux is no longer enabled by default.
it is now defined in each arch same as the other *_SIGNATURE definitions. - add new LINUX32_GO_RT0_SIGNATURE for compat_linux32, and is defined in amd64 and aarch64.
This commit is contained in:
parent
d9c43f29c8
commit
bbb9625b59
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.h,v 1.1 2021/09/23 06:56:27 ryo Exp $ */
|
||||
/* $NetBSD: linux_exec.h,v 1.2 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2021 The NetBSD Foundation, Inc.
|
||||
|
@ -34,4 +34,6 @@
|
|||
|
||||
#define linux_exec_setup_stack exec_setup_stack
|
||||
|
||||
#define LINUX_GO_RT0_SIGNATURE
|
||||
|
||||
#endif /* !_AARCH64_LINUX_EXEC_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.h,v 1.5 2013/11/18 01:32:22 chs Exp $ */
|
||||
/* $NetBSD: linux_exec.h,v 1.6 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
|
||||
|
@ -65,6 +65,7 @@ struct linux_extra_stack_data64 {
|
|||
#define LINUX_MACHDEP_ELF_COPYARGS
|
||||
|
||||
#define LINUX_DEBUGLINK_SIGNATURE
|
||||
#define LINUX_GO_RT0_SIGNATURE
|
||||
|
||||
int linux_exec_setup_stack(struct lwp *, struct exec_package *);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.h,v 1.10 2017/02/12 21:02:19 chs Exp $ */
|
||||
/* $NetBSD: linux_exec.h,v 1.11 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -38,6 +38,8 @@
|
|||
#define LINUX_ELF_AUX_ARGSIZ \
|
||||
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES)
|
||||
|
||||
#define LINUX_GO_RT0_SIGNATURE
|
||||
|
||||
#define linux_exec_setup_stack exec_setup_stack
|
||||
|
||||
#endif /* !_I386_LINUX_EXEC_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.h,v 1.13 2017/02/12 21:02:19 chs Exp $ */
|
||||
/* $NetBSD: linux_exec.h,v 1.14 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -40,6 +40,7 @@
|
|||
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES)
|
||||
|
||||
#define LINUX_DEBUGLINK_SIGNATURE
|
||||
#define LINUX_GO_RT0_SIGNATURE
|
||||
|
||||
#ifdef _KERNEL
|
||||
int linux_exec_setup_stack(struct lwp *, struct exec_package *);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.h,v 1.16 2017/02/12 21:02:19 chs Exp $ */
|
||||
/* $NetBSD: linux_exec.h,v 1.17 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -57,6 +57,7 @@
|
|||
|
||||
#define LINUX_ATEXIT_SIGNATURE 1
|
||||
#define LINUX_GCC_SIGNATURE 1
|
||||
#define LINUX_GO_RT0_SIGNATURE 1
|
||||
|
||||
#define LINUX_ELF_AUX_ARGSIZ \
|
||||
(LINUX_ELF_AUX_ENTRIES * sizeof(Aux32Info) + LINUX_RANDOM_BYTES)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.h,v 1.24 2017/02/12 21:02:19 chs Exp $ */
|
||||
/* $NetBSD: linux_exec.h,v 1.25 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -57,6 +57,7 @@
|
|||
*/
|
||||
|
||||
#define LINUX_GCC_SIGNATURE 1
|
||||
#define LINUX_GO_RT0_SIGNATURE 1
|
||||
/*
|
||||
* LINUX_ATEXIT_SIGNATURE enable the atexit_signature test. See
|
||||
* sys/compat/linux/common/linux_exec_elf32.c:linux_atexit_signature()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec.h,v 1.54 2021/09/23 06:56:27 ryo Exp $ */
|
||||
/* $NetBSD: linux_exec.h,v 1.55 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -155,6 +155,10 @@ int linux_elf32_debuglink_signature(struct lwp *l,
|
|||
int linux_elf32_atexit_signature(struct lwp *l,
|
||||
struct exec_package *, Elf32_Ehdr *);
|
||||
#endif
|
||||
#ifdef LINUX_GO_RT0_SIGNATURE
|
||||
int linux_elf32_go_rt0_signature(struct lwp *l,
|
||||
struct exec_package *, Elf32_Ehdr *);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef EXEC_ELF64
|
||||
int linux_elf64_probe(struct lwp *, struct exec_package *, void *,
|
||||
|
@ -175,6 +179,10 @@ int linux_elf64_debuglink_signature(struct lwp *l,
|
|||
int linux_elf64_atexit_signature(struct lwp *l,
|
||||
struct exec_package *, Elf64_Ehdr *);
|
||||
#endif
|
||||
#ifdef LINUX_GO_RT0_SIGNATURE
|
||||
int linux_elf64_go_rt0_signature(struct lwp *l,
|
||||
struct exec_package *, Elf64_Ehdr *);
|
||||
#endif
|
||||
#endif
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux_exec_elf32.c,v 1.100 2020/01/12 18:30:58 ad Exp $ */
|
||||
/* $NetBSD: linux_exec_elf32.c,v 1.101 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.100 2020/01/12 18:30:58 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.101 2021/11/26 08:56:28 ryo Exp $");
|
||||
|
||||
#ifndef ELFSIZE
|
||||
/* XXX should die */
|
||||
|
@ -74,8 +74,6 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.100 2020/01/12 18:30:58 ad Ex
|
|||
#include <compat/linux/linux_syscallargs.h>
|
||||
#include <compat/linux/linux_syscall.h>
|
||||
|
||||
#define LINUX_GO_RT0_SIGNATURE
|
||||
|
||||
#ifdef DEBUG_LINUX
|
||||
#define DPRINTF(a) uprintf a
|
||||
#else
|
||||
|
@ -275,7 +273,7 @@ out:
|
|||
* Look for a .gopclntab, specific to go binaries
|
||||
* in it look for a symbol called _rt0_<cpu>_linux
|
||||
*/
|
||||
static int
|
||||
int
|
||||
ELFNAME2(linux,go_rt0_signature)(struct lwp *l, struct exec_package *epp, Elf_Ehdr *eh)
|
||||
{
|
||||
Elf_Shdr *sh;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_exec.h,v 1.1 2021/11/25 03:08:04 ryo Exp $ */
|
||||
/* $NetBSD: linux32_exec.h,v 1.2 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2021 The NetBSD Foundation, Inc.
|
||||
|
@ -54,4 +54,6 @@ struct linux32_extra_stack_data {
|
|||
|
||||
int linux32_exec_setup_stack(struct lwp *, struct exec_package *);
|
||||
|
||||
#define LINUX32_GO_RT0_SIGNATURE
|
||||
|
||||
#endif /* _AARCH64_LINUX32_EXEC_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_exec.h,v 1.9 2021/11/25 02:48:00 ryo Exp $ */
|
||||
/* $NetBSD: linux32_exec.h,v 1.10 2021/11/26 08:56:28 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
||||
|
@ -40,6 +40,7 @@
|
|||
#define LINUX32_USRSTACK 0xC0000000
|
||||
|
||||
#define LINUX32_DEBUGLINK_SIGNATURE 1
|
||||
#define LINUX32_GO_RT0_SIGNATURE 1
|
||||
|
||||
/* Counted from common/linux32_exec_elf32.c */
|
||||
#define LINUX32_ELF_AUX_ENTRIES 20
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_exec.h,v 1.8 2021/11/25 03:08:04 ryo Exp $ */
|
||||
/* $NetBSD: linux32_exec.h,v 1.9 2021/11/26 08:56:29 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
||||
|
@ -67,6 +67,10 @@ int linux_elf32_debuglink_signature(struct lwp *l,
|
|||
int linux_elf32_atexit_signature(struct lwp *l,
|
||||
struct exec_package *, Elf32_Ehdr *);
|
||||
#endif
|
||||
#ifdef LINUX32_GO_RT0_SIGNATURE
|
||||
int linux_elf32_go_rt0_signature(struct lwp *l,
|
||||
struct exec_package *, Elf32_Ehdr *);
|
||||
#endif
|
||||
|
||||
#endif /* EXEC_ELF32 */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_exec_elf32.c,v 1.22 2021/11/25 03:08:04 ryo Exp $ */
|
||||
/* $NetBSD: linux32_exec_elf32.c,v 1.23 2021/11/26 08:56:29 ryo Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1998, 2000, 2001,2006 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.22 2021/11/25 03:08:04 ryo Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_exec_elf32.c,v 1.23 2021/11/26 08:56:29 ryo Exp $");
|
||||
|
||||
#define ELFSIZE 32
|
||||
|
||||
|
@ -82,6 +82,9 @@ ELFNAME2(linux32,probe)(struct lwp *l, struct exec_package *epp,
|
|||
#endif
|
||||
#ifdef LINUX32_DEBUGLINK_SIGNATURE
|
||||
((error = ELFNAME2(linux,debuglink_signature)(l, epp, eh)) != 0) &&
|
||||
#endif
|
||||
#ifdef LINUX32_GO_RT0_SIGNATURE
|
||||
((error = ELFNAME2(linux,go_rt0_signature)(l, epp, eh)) != 0) &&
|
||||
#endif
|
||||
1)
|
||||
return error;
|
||||
|
|
Loading…
Reference in New Issue