summaryrefslogtreecommitdiff
path: root/sys/compat/linux
diff options
context:
space:
mode:
authorpgoyette <pgoyette@NetBSD.org>2019-01-27 02:08:33 +0000
committerpgoyette <pgoyette@NetBSD.org>2019-01-27 02:08:33 +0000
commitcc17ee2ece085d7d746bcd8fa9be19170855aaac (patch)
tree5be40613f405cb081b2c44410b1506781927f8e3 /sys/compat/linux
parent10dd4cc92542aa04b0e59469a484a48e4c3cdd24 (diff)
Merge the [pgoyette-compat] branch
Diffstat (limited to 'sys/compat/linux')
-rw-r--r--sys/compat/linux/common/linux_exec_elf32.c12
-rw-r--r--sys/compat/linux/common/linux_mod.c10
-rw-r--r--sys/compat/linux/files.linux4
3 files changed, 13 insertions, 13 deletions
diff --git a/sys/compat/linux/common/linux_exec_elf32.c b/sys/compat/linux/common/linux_exec_elf32.c
index 2850b514dc5..96d188215a7 100644
--- a/sys/compat/linux/common/linux_exec_elf32.c
+++ b/sys/compat/linux/common/linux_exec_elf32.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec_elf32.c,v 1.97 2018/07/15 21:31:00 christos Exp $ */
+/* $NetBSD: linux_exec_elf32.c,v 1.98 2019/01/27 02:08:40 pgoyette 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.97 2018/07/15 21:31:00 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.98 2019/01/27 02:08:40 pgoyette Exp $");
#ifndef ELFSIZE
/* XXX should die */
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_elf32.c,v 1.97 2018/07/15 21:31:00 christ
#include <sys/stat.h>
#include <sys/kauth.h>
#include <sys/cprng.h>
+#include <sys/compat_stub.h>
#include <sys/mman.h>
#include <sys/syscallargs.h>
@@ -334,11 +335,8 @@ ELFNAME2(linux,go_rt0_signature)(struct lwp *l, struct exec_package *epp, Elf_Eh
goto out;
#if (ELFSIZE == 32)
- extern const char machine32[] __weak;
- if (machine32 != NULL)
- m = machine32;
- else
- m = machine;
+ extern struct netbsd32_machine32_hook_t netbsd32_machine32_hook;
+ MODULE_CALL_HOOK(netbsd32_machine32_hook, (), machine, m);
#else
m = machine;
#endif
diff --git a/sys/compat/linux/common/linux_mod.c b/sys/compat/linux/common/linux_mod.c
index 8e2b8c608b0..685c8b73aae 100644
--- a/sys/compat/linux/common/linux_mod.c
+++ b/sys/compat/linux/common/linux_mod.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_mod.c,v 1.10 2017/12/10 00:43:05 kre Exp $ */
+/* $NetBSD: linux_mod.c,v 1.11 2019/01/27 02:08:40 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10 2017/12/10 00:43:05 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.11 2019/01/27 02:08:40 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_execfmt.h"
@@ -66,8 +66,10 @@ __KERNEL_RCSID(0, "$NetBSD: linux_mod.c,v 1.10 2017/12/10 00:43:05 kre Exp $");
# define MD3 ""
#endif
-MODULE(MODULE_CLASS_EXEC, compat_linux, "compat,compat_ossaudio,sysv_ipc"
- MD1 MD2 MD3);
+#define REQ1 "compat_ossaudio,sysv_ipc,compat_util"
+#define REQ2 ",compat_50,compat_43"
+
+MODULE(MODULE_CLASS_EXEC, compat_linux, REQ1 REQ2 MD1 MD2 MD3);
static struct execsw linux_execsw[] = {
#if defined(EXEC_ELF32) && ELFSIZE == 32
diff --git a/sys/compat/linux/files.linux b/sys/compat/linux/files.linux
index b81b34f19b1..69924a27e48 100644
--- a/sys/compat/linux/files.linux
+++ b/sys/compat/linux/files.linux
@@ -1,4 +1,4 @@
-# $NetBSD: files.linux,v 1.21 2014/11/17 01:01:57 uebayasi Exp $
+# $NetBSD: files.linux,v 1.22 2019/01/27 02:08:39 pgoyette Exp $
#
# Config file description for machine-independent Linux compat code.
# Included by ports that need it.
@@ -6,7 +6,7 @@
# ports should define any machine-specific files they need in their
# own file lists.
-define compat_linux
+define compat_linux : compat, compat_ossaudio, sysv_ipc
file compat/linux/common/linux_blkio.c compat_linux
file compat/linux/common/linux_cdrom.c compat_linux
file compat/linux/common/linux_errno.c compat_linux