summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-01-20 01:09:53 +0000
committerjhb <jhb@FreeBSD.org>2016-01-20 01:09:53 +0000
commit77733541d454c3b987e985b85df345fc8c7f205d (patch)
tree06645c8b5fb21159a6ab7cfe6514945bca030b0f /sys/amd64
parent2651e6b1c65c3a49c9390393bd44d1fc1d428f42 (diff)
downloadFreeBSD-src-77733541d454c3b987e985b85df345fc8c7f205d.zip
FreeBSD-src-77733541d454c3b987e985b85df345fc8c7f205d.tar.gz
MFC 289769,289822,290143,290144:
Rename remaining linux32 symbols from linux_* to linux32_*. 289769: Rename remaining linux32 symbols such as linux_sysent[] and linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with linux64.ko. While here, add support for linux64 binaries to systrace. - Update NOPROTO entries in amd64/linux/syscalls.master to match the main table to fix systrace build. - Add a special case for union l_semun arguments to the systrace generation. - The systrace_linux32 module now only builds the systrace_linux32.ko. module on amd64. - Add a new systrace_linux module that builds on both i386 and amd64. For i386 it builds the existing systrace_linux.ko. For amd64 it builds a systrace_linux.ko for 64-bit binaries. 289822: Fix build for the KTR-enabled kernels. 290143: Fix build with DEBUG defined. 290144: Update for LINUX32 rename. The assembler didn't complain about undefined symbols but just used 0 after the rename.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/linux/syscalls.master6
-rw-r--r--sys/amd64/linux32/linux.h2
-rw-r--r--sys/amd64/linux32/linux32_locore.s4
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c10
-rw-r--r--sys/amd64/linux32/syscalls.conf8
-rw-r--r--sys/amd64/linux32/syscalls.master2
6 files changed, 16 insertions, 16 deletions
diff --git a/sys/amd64/linux/syscalls.master b/sys/amd64/linux/syscalls.master
index d840f88..87c8000 100644
--- a/sys/amd64/linux/syscalls.master
+++ b/sys/amd64/linux/syscalls.master
@@ -49,8 +49,8 @@
struct l_newstat *buf); }
6 AUE_LSTAT STD { int linux_newlstat(char *path, \
struct l_newstat *buf); }
-7 AUE_POLL NOPROTO { int poll(struct pollfd*, \
- unsigned int nfds, int timeout); }
+7 AUE_POLL NOPROTO { int poll(struct pollfd *fds, u_int nfds, \
+ int timeout); }
8 AUE_LSEEK STD { int linux_lseek(l_uint fdes, l_off_t off, \
l_int whence); }
9 AUE_MMAP STD { int linux_mmap2(l_ulong addr, l_ulong len, \
@@ -316,7 +316,7 @@
161 AUE_CHROOT NOPROTO { int chroot(char *path); }
162 AUE_SYNC NOPROTO { int sync(void); }
163 AUE_ACCT NOPROTO { int acct(char *path); }
-164 AUE_SETTIMEOFDAY NOPROTO { int settimeofday(struct l_timeval *tp, struct timezone *tzp); }
+164 AUE_SETTIMEOFDAY NOPROTO { int settimeofday(struct l_timeval *tv, struct timezone *tzp); }
165 AUE_MOUNT STD { int linux_mount(char *specialfile, \
char *dir, char *filesystemtype, \
l_ulong rwflag, void *data); }
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index e3b9f11..02d12f5 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -40,7 +40,7 @@
* debugging support
*/
extern u_char linux_debug_map[];
-#define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name)
+#define ldebug(name) isclr(linux_debug_map, LINUX32_SYS_linux_ ## name)
#define ARGS(nm, fmt) "linux(%ld/%ld): "#nm"("fmt")\n", \
(long)td->td_proc->p_pid, (long)td->td_tid
#define LMSG(fmt) "linux(%ld/%ld): "fmt"\n", \
diff --git a/sys/amd64/linux32/linux32_locore.s b/sys/amd64/linux32/linux32_locore.s
index 4edbdf3..7bbd69a 100644
--- a/sys/amd64/linux32/linux32_locore.s
+++ b/sys/amd64/linux32/linux32_locore.s
@@ -28,7 +28,7 @@ NON_GPROF_ENTRY(linux32_sigcode)
jmp *LINUX_SIGF_HANDLER(%ebx)
.startsigcode:
popl %eax
- movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */
+ movl $LINUX32_SYS_linux_sigreturn,%eax /* linux_sigreturn() */
int $0x80 /* enter kernel with args */
.endsigcode:
0: jmp 0b
@@ -44,7 +44,7 @@ NON_GPROF_ENTRY(linux32_rt_sigcode)
push %eax
jmp *LINUX_RT_SIGF_HANDLER(%edi)
.startrtsigcode:
- movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */
+ movl $LINUX32_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */
int $0x80 /* enter kernel with args */
.endrtsigcode:
0: jmp 0b
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index 8f722aa..73949d9 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -105,8 +105,8 @@ MODULE_VERSION(linux, 1);
* to syscall 0. This is slightly less bogus than using
* ldebug(sigreturn).
*/
-#define LINUX_SYS_linux_rt_sendsig 0
-#define LINUX_SYS_linux_sendsig 0
+#define LINUX32_SYS_linux_rt_sendsig 0
+#define LINUX32_SYS_linux_sendsig 0
const char *linux_kplatform;
static int linux_szsigcode;
@@ -115,7 +115,7 @@ static char *linux_shared_page_mapping;
extern char _binary_linux32_locore_o_start;
extern char _binary_linux32_locore_o_end;
-extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
+extern struct sysent linux32_sysent[LINUX32_SYS_MAXSYSCALL];
SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
@@ -1008,8 +1008,8 @@ linux32_fixlimit(struct rlimit *rl, int which)
}
struct sysentvec elf_linux_sysvec = {
- .sv_size = LINUX_SYS_MAXSYSCALL,
- .sv_table = linux_sysent,
+ .sv_size = LINUX32_SYS_MAXSYSCALL,
+ .sv_table = linux32_sysent,
.sv_mask = 0,
.sv_sigsize = 0,
.sv_sigtbl = NULL,
diff --git a/sys/amd64/linux32/syscalls.conf b/sys/amd64/linux32/syscalls.conf
index dc0ad82..7d096b5 100644
--- a/sys/amd64/linux32/syscalls.conf
+++ b/sys/amd64/linux32/syscalls.conf
@@ -1,11 +1,11 @@
# $FreeBSD$
sysnames="linux32_syscalls.c"
sysproto="linux32_proto.h"
-sysproto_h=_LINUX_SYSPROTO_H_
+sysproto_h=_LINUX32_SYSPROTO_H_
syshdr="linux32_syscall.h"
syssw="linux32_sysent.c"
sysmk="/dev/null"
-syscallprefix="LINUX_SYS_"
-switchname="linux_sysent"
-namesname="linux_syscallnames"
+syscallprefix="LINUX32_SYS_"
+switchname="linux32_sysent"
+namesname="linux32_syscallnames"
systrace="linux32_systrace_args.c"
diff --git a/sys/amd64/linux32/syscalls.master b/sys/amd64/linux32/syscalls.master
index 6e09c5a..0396b30 100644
--- a/sys/amd64/linux32/syscalls.master
+++ b/sys/amd64/linux32/syscalls.master
@@ -2,7 +2,7 @@
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
; System call name/number master file (or rather, slave, from LINUX).
-; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h.
+; Processed to create linux32_sysent.c, linux32_proto.h and linux32_syscall.h.
; Columns: number audit type nargs name alt{name,tag,rtyp}/comments
; number system call number, must be in order
OpenPOWER on IntegriCloud