@samitouri / QOSamiQemu / commits / 2c4cc8b61d

bsd-user: Remove NetBSD-specific code

Remove the NetBSD specific code form bsd-user. It's not been maintained in any meaningful way since it was introduced to the tree in 2008. It hasn't been connected to the build since 2021, and last time (in 2023) I tried to mock-up the meson support it needed, it failed to build. While there were some out-of-tree work, I've not been able to connect with that code. Cc: Reinoud Zandijk <reinoud@netbsd.org> Cc: Ryo ONODERA <ryoon@netbsd.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Warner Losh <imp@bsdimp.com>

Warner Losh committed Feb 6, 2026 at 08:04 UTC 2c4cc8b61d6ec93eb23628fbea4357dc982163b3
12 files changed -962
bsd-user/netbsd/host-os.h deleted
-25
@@ -1,25 +0,0 @@
1 -/*
2 - * NetBSD host dependent code and definitions
3 - *
4 - * Copyright (c) 2013 Stacey D. Son
5 - *
6 - * This program is free software; you can redistribute it and/or modify
7 - * it under the terms of the GNU General Public License as published by
8 - * the Free Software Foundation; either version 2 of the License, or
9 - * (at your option) any later version.
10 - *
11 - * This program is distributed in the hope that it will be useful,
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 - * GNU General Public License for more details.
15 - *
16 - * You should have received a copy of the GNU General Public License
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 - */
19 -
20 -#ifndef HOST_OS_H
21 -#define HOST_OS_H
22 -
23 -#define HOST_DEFAULT_BSD_TYPE target_netbsd
24 -
25 -#endif /* HOST_OS_H */
bsd-user/netbsd/os-strace.h deleted
-1
@@ -1 +0,0 @@
1 -/* XXX NetBSD dependent strace print functions */
bsd-user/netbsd/strace.list deleted
-145
@@ -1,145 +0,0 @@
1 -{ TARGET_NETBSD_NR___getcwd, "__getcwd", NULL, NULL, NULL },
2 -{ TARGET_NETBSD_NR___syscall, "__syscall", NULL, NULL, NULL },
3 -{ TARGET_NETBSD_NR___sysctl, "__sysctl", NULL, NULL, NULL },
4 -{ TARGET_NETBSD_NR_accept, "accept", "%s(%d,%#x,%#x)", NULL, NULL },
5 -{ TARGET_NETBSD_NR_access, "access", "%s(\"%s\",%#o)", NULL, NULL },
6 -{ TARGET_NETBSD_NR_acct, "acct", NULL, NULL, NULL },
7 -{ TARGET_NETBSD_NR_adjtime, "adjtime", NULL, NULL, NULL },
8 -{ TARGET_NETBSD_NR_bind, "bind", NULL, NULL, NULL },
9 -{ TARGET_NETBSD_NR_break, "break", NULL, NULL, NULL },
10 -{ TARGET_NETBSD_NR_chdir, "chdir", "%s(\"%s\")", NULL, NULL },
11 -{ TARGET_NETBSD_NR_chflags, "chflags", NULL, NULL, NULL },
12 -{ TARGET_NETBSD_NR_chmod, "chmod", "%s(\"%s\",%#o)", NULL, NULL },
13 -{ TARGET_NETBSD_NR_chown, "chown", NULL, NULL, NULL },
14 -{ TARGET_NETBSD_NR_chroot, "chroot", NULL, NULL, NULL },
15 -{ TARGET_NETBSD_NR_clock_getres, "clock_getres", NULL, NULL, NULL },
16 -{ TARGET_NETBSD_NR_clock_gettime, "clock_gettime", NULL, NULL, NULL },
17 -{ TARGET_NETBSD_NR_clock_settime, "clock_settime", NULL, NULL, NULL },
18 -{ TARGET_NETBSD_NR_close, "close", "%s(%d)", NULL, NULL },
19 -{ TARGET_NETBSD_NR_connect, "connect", "%s(%d,%#x,%d)", NULL, NULL },
20 -{ TARGET_NETBSD_NR_dup, "dup", NULL, NULL, NULL },
21 -{ TARGET_NETBSD_NR_dup2, "dup2", NULL, NULL, NULL },
22 -{ TARGET_NETBSD_NR_execve, "execve", NULL, print_execve, NULL },
23 -{ TARGET_NETBSD_NR_exit, "exit", "%s(%d)\n", NULL, NULL },
24 -{ TARGET_NETBSD_NR_fchdir, "fchdir", NULL, NULL, NULL },
25 -{ TARGET_NETBSD_NR_fchflags, "fchflags", NULL, NULL, NULL },
26 -{ TARGET_NETBSD_NR_fchmod, "fchmod", "%s(%d,%#o)", NULL, NULL },
27 -{ TARGET_NETBSD_NR_fchown, "fchown", "%s(\"%s\",%d,%d)", NULL, NULL },
28 -{ TARGET_NETBSD_NR_fcntl, "fcntl", NULL, NULL, NULL },
29 -{ TARGET_NETBSD_NR_flock, "flock", NULL, NULL, NULL },
30 -{ TARGET_NETBSD_NR_fork, "fork", "%s()", NULL, NULL },
31 -{ TARGET_NETBSD_NR_fpathconf, "fpathconf", NULL, NULL, NULL },
32 -{ TARGET_NETBSD_NR_fsync, "fsync", NULL, NULL, NULL },
33 -{ TARGET_NETBSD_NR_ftruncate, "ftruncate", NULL, NULL, NULL },
34 -{ TARGET_NETBSD_NR_futimes, "futimes", NULL, NULL, NULL },
35 -{ TARGET_NETBSD_NR_getegid, "getegid", "%s()", NULL, NULL },
36 -{ TARGET_NETBSD_NR_geteuid, "geteuid", "%s()", NULL, NULL },
37 -{ TARGET_NETBSD_NR_getgid, "getgid", "%s()", NULL, NULL },
38 -{ TARGET_NETBSD_NR_getgroups, "getgroups", NULL, NULL, NULL },
39 -{ TARGET_NETBSD_NR_getitimer, "getitimer", NULL, NULL, NULL },
40 -{ TARGET_NETBSD_NR_getpeername, "getpeername", NULL, NULL, NULL },
41 -{ TARGET_NETBSD_NR_getpgid, "getpgid", NULL, NULL, NULL },
42 -{ TARGET_NETBSD_NR_getpgrp, "getpgrp", "%s()", NULL, NULL },
43 -{ TARGET_NETBSD_NR_getpid, "getpid", "%s()", NULL, NULL },
44 -{ TARGET_NETBSD_NR_getppid, "getppid", "%s()", NULL, NULL },
45 -{ TARGET_NETBSD_NR_getpriority, "getpriority", "%s(%#x,%#x)", NULL, NULL },
46 -{ TARGET_NETBSD_NR_getrlimit, "getrlimit", NULL, NULL, NULL },
47 -{ TARGET_NETBSD_NR_getrusage, "getrusage", NULL, NULL, NULL },
48 -{ TARGET_NETBSD_NR_getsid, "getsid", NULL, NULL, NULL },
49 -{ TARGET_NETBSD_NR_getsockname, "getsockname", NULL, NULL, NULL },
50 -{ TARGET_NETBSD_NR_getsockopt, "getsockopt", NULL, NULL, NULL },
51 -{ TARGET_NETBSD_NR_gettimeofday, "gettimeofday", NULL, NULL, NULL },
52 -{ TARGET_NETBSD_NR_getuid, "getuid", "%s()", NULL, NULL },
53 -{ TARGET_NETBSD_NR_ioctl, "ioctl", NULL, NULL, NULL },
54 -{ TARGET_NETBSD_NR_issetugid, "issetugid", "%s()", NULL, NULL },
55 -{ TARGET_NETBSD_NR_kevent, "kevent", NULL, NULL, NULL },
56 -{ TARGET_NETBSD_NR_kill, "kill", NULL, NULL, NULL },
57 -{ TARGET_NETBSD_NR_kqueue, "kqueue", NULL, NULL, NULL },
58 -{ TARGET_NETBSD_NR_ktrace, "ktrace", NULL, NULL, NULL },
59 -{ TARGET_NETBSD_NR_lchown, "lchown", NULL, NULL, NULL },
60 -{ TARGET_NETBSD_NR_lfs_bmapv, "lfs_bmapv", NULL, NULL, NULL },
61 -{ TARGET_NETBSD_NR_lfs_markv, "lfs_markv", NULL, NULL, NULL },
62 -{ TARGET_NETBSD_NR_lfs_segclean, "lfs_segclean", NULL, NULL, NULL },
63 -{ TARGET_NETBSD_NR_lfs_segwait, "lfs_segwait", NULL, NULL, NULL },
64 -{ TARGET_NETBSD_NR_link, "link", "%s(\"%s\",\"%s\")", NULL, NULL },
65 -{ TARGET_NETBSD_NR_listen, "listen", NULL, NULL, NULL },
66 -{ TARGET_NETBSD_NR_lseek, "lseek", NULL, NULL, NULL },
67 -{ TARGET_NETBSD_NR_madvise, "madvise", NULL, NULL, NULL },
68 -{ TARGET_NETBSD_NR_mincore, "mincore", NULL, NULL, NULL },
69 -{ TARGET_NETBSD_NR_minherit, "minherit", NULL, NULL, NULL },
70 -{ TARGET_NETBSD_NR_mkdir, "mkdir", "%s(\"%s\",%#o)", NULL, NULL },
71 -{ TARGET_NETBSD_NR_mkfifo, "mkfifo", NULL, NULL, NULL },
72 -{ TARGET_NETBSD_NR_mknod, "mknod", "%s(\"%s\",%#o,%#x)", NULL, NULL },
73 -{ TARGET_NETBSD_NR_mlock, "mlock", NULL, NULL, NULL },
74 -{ TARGET_NETBSD_NR_mlockall, "mlockall", NULL, NULL, NULL },
75 -{ TARGET_NETBSD_NR_mmap, "mmap", NULL, NULL, print_syscall_ret_addr },
76 -{ TARGET_NETBSD_NR_mprotect, "mprotect", "%s(%#x,%#x,%d)", NULL, NULL },
77 -{ TARGET_NETBSD_NR_msgget, "msgget", NULL, NULL, NULL },
78 -{ TARGET_NETBSD_NR_msgrcv, "msgrcv", NULL, NULL, NULL },
79 -{ TARGET_NETBSD_NR_msgsnd, "msgsnd", NULL, NULL, NULL },
80 -{ TARGET_NETBSD_NR_munlock, "munlock", NULL, NULL, NULL },
81 -{ TARGET_NETBSD_NR_munlockall, "munlockall", NULL, NULL, NULL },
82 -{ TARGET_NETBSD_NR_munmap, "munmap", "%s(%p,%d)", NULL, NULL },
83 -{ TARGET_NETBSD_NR_nanosleep, "nanosleep", NULL, NULL, NULL },
84 -{ TARGET_NETBSD_NR_nfssvc, "nfssvc", NULL, NULL, NULL },
85 -{ TARGET_NETBSD_NR_open, "open", "%s(\"%s\",%#x,%#o)", NULL, NULL },
86 -{ TARGET_NETBSD_NR_pathconf, "pathconf", NULL, NULL, NULL },
87 -{ TARGET_NETBSD_NR_pipe, "pipe", NULL, NULL, NULL },
88 -{ TARGET_NETBSD_NR_poll, "poll", NULL, NULL, NULL },
89 -{ TARGET_NETBSD_NR_pread, "pread", NULL, NULL, NULL },
90 -{ TARGET_NETBSD_NR_preadv, "preadv", NULL, NULL, NULL },
91 -{ TARGET_NETBSD_NR_profil, "profil", NULL, NULL, NULL },
92 -{ TARGET_NETBSD_NR_ptrace, "ptrace", NULL, NULL, NULL },
93 -{ TARGET_NETBSD_NR_pwrite, "pwrite", NULL, NULL, NULL },
94 -{ TARGET_NETBSD_NR_pwritev, "pwritev", NULL, NULL, NULL },
95 -{ TARGET_NETBSD_NR_quotactl, "quotactl", NULL, NULL, NULL },
96 -{ TARGET_NETBSD_NR_read, "read", "%s(%d,%#x,%d)", NULL, NULL },
97 -{ TARGET_NETBSD_NR_readlink, "readlink", "%s(\"%s\",%p,%d)", NULL, NULL },
98 -{ TARGET_NETBSD_NR_readv, "readv", NULL, NULL, NULL },
99 -{ TARGET_NETBSD_NR_reboot, "reboot", NULL, NULL, NULL },
100 -{ TARGET_NETBSD_NR_recvfrom, "recvfrom", NULL, NULL, NULL },
101 -{ TARGET_NETBSD_NR_recvmsg, "recvmsg", NULL, NULL, NULL },
102 -{ TARGET_NETBSD_NR_rename, "rename", "%s(\"%s\",\"%s\")", NULL, NULL },
103 -{ TARGET_NETBSD_NR_revoke, "revoke", NULL, NULL, NULL },
104 -{ TARGET_NETBSD_NR_rmdir, "rmdir", NULL, NULL, NULL },
105 -{ TARGET_NETBSD_NR_sbrk, "sbrk", NULL, NULL, NULL },
106 -{ TARGET_NETBSD_NR_sched_yield, "sched_yield", NULL, NULL, NULL },
107 -{ TARGET_NETBSD_NR_select, "select", NULL, NULL, NULL },
108 -{ TARGET_NETBSD_NR_semget, "semget", NULL, NULL, NULL },
109 -{ TARGET_NETBSD_NR_semop, "semop", NULL, NULL, NULL },
110 -{ TARGET_NETBSD_NR_sendmsg, "sendmsg", NULL, NULL, NULL },
111 -{ TARGET_NETBSD_NR_sendto, "sendto", NULL, NULL, NULL },
112 -{ TARGET_NETBSD_NR_setegid, "setegid", NULL, NULL, NULL },
113 -{ TARGET_NETBSD_NR_seteuid, "seteuid", NULL, NULL, NULL },
114 -{ TARGET_NETBSD_NR_setgid, "setgid", NULL, NULL, NULL },
115 -{ TARGET_NETBSD_NR_setgroups, "setgroups", NULL, NULL, NULL },
116 -{ TARGET_NETBSD_NR_setitimer, "setitimer", NULL, NULL, NULL },
117 -{ TARGET_NETBSD_NR_setpgid, "setpgid", NULL, NULL, NULL },
118 -{ TARGET_NETBSD_NR_setpriority, "setpriority", NULL, NULL, NULL },
119 -{ TARGET_NETBSD_NR_setregid, "setregid", NULL, NULL, NULL },
120 -{ TARGET_NETBSD_NR_setreuid, "setreuid", NULL, NULL, NULL },
121 -{ TARGET_NETBSD_NR_setrlimit, "setrlimit", NULL, NULL, NULL },
122 -{ TARGET_NETBSD_NR_setsid, "setsid", NULL, NULL, NULL },
123 -{ TARGET_NETBSD_NR_setsockopt, "setsockopt", NULL, NULL, NULL },
124 -{ TARGET_NETBSD_NR_settimeofday, "settimeofday", NULL, NULL, NULL },
125 -{ TARGET_NETBSD_NR_setuid, "setuid", NULL, NULL, NULL },
126 -{ TARGET_NETBSD_NR_shmat, "shmat", NULL, NULL, NULL },
127 -{ TARGET_NETBSD_NR_shmdt, "shmdt", NULL, NULL, NULL },
128 -{ TARGET_NETBSD_NR_shmget, "shmget", NULL, NULL, NULL },
129 -{ TARGET_NETBSD_NR_shutdown, "shutdown", NULL, NULL, NULL },
130 -{ TARGET_NETBSD_NR_socketpair, "socketpair", NULL, NULL, NULL },
131 -{ TARGET_NETBSD_NR_sstk, "sstk", NULL, NULL, NULL },
132 -{ TARGET_NETBSD_NR_swapctl, "swapctl", NULL, NULL, NULL },
133 -{ TARGET_NETBSD_NR_symlink, "symlink", "%s(\"%s\",\"%s\")", NULL, NULL },
134 -{ TARGET_NETBSD_NR_sync, "sync", NULL, NULL, NULL },
135 -{ TARGET_NETBSD_NR_sysarch, "sysarch", NULL, NULL, NULL },
136 -{ TARGET_NETBSD_NR_syscall, "syscall", NULL, NULL, NULL },
137 -{ TARGET_NETBSD_NR_truncate, "truncate", NULL, NULL, NULL },
138 -{ TARGET_NETBSD_NR_umask, "umask", "%s(%#o)", NULL, NULL },
139 -{ TARGET_NETBSD_NR_unlink, "unlink", "%s(\"%s\")", NULL, NULL },
140 -{ TARGET_NETBSD_NR_unmount, "unmount", NULL, NULL, NULL },
141 -{ TARGET_NETBSD_NR_utimes, "utimes", NULL, NULL, NULL },
142 -{ TARGET_NETBSD_NR_vfork, "vfork", NULL, NULL, NULL },
143 -{ TARGET_NETBSD_NR_wait4, "wait4", NULL, NULL, NULL },
144 -{ TARGET_NETBSD_NR_write, "write", "%s(%d,%#x,%d)", NULL, NULL },
145 -{ TARGET_NETBSD_NR_writev, "writev", "%s(%d,%p,%#x)", NULL, NULL },
bsd-user/netbsd/syscall_nr.h deleted
-373
@@ -1,373 +0,0 @@
1 -/* $NetBSD: syscall.h,v 1.215 2008/06/17 16:07:57 tsutsui Exp $ */
2 -
3 -/*
4 - * System call numbers.
5 - *
6 - * created from NetBSD: syscalls.master,v 1.204 2008/06/17 16:05:23 tsutsui Exp
7 - */
8 -
9 -#define TARGET_NETBSD_NR_syscall 0
10 -#define TARGET_NETBSD_NR_exit 1
11 -#define TARGET_NETBSD_NR_fork 2
12 -#define TARGET_NETBSD_NR_read 3
13 -#define TARGET_NETBSD_NR_write 4
14 -#define TARGET_NETBSD_NR_open 5
15 -#define TARGET_NETBSD_NR_close 6
16 -#define TARGET_NETBSD_NR_wait4 7
17 -#define TARGET_NETBSD_NR_compat_43_ocreat 8
18 -#define TARGET_NETBSD_NR_link 9
19 -#define TARGET_NETBSD_NR_unlink 10
20 -#define TARGET_NETBSD_NR_chdir 12
21 -#define TARGET_NETBSD_NR_fchdir 13
22 -#define TARGET_NETBSD_NR_mknod 14
23 -#define TARGET_NETBSD_NR_chmod 15
24 -#define TARGET_NETBSD_NR_chown 16
25 -#define TARGET_NETBSD_NR_break 17
26 -#define TARGET_NETBSD_NR_compat_20_getfsstat 18
27 -#define TARGET_NETBSD_NR_compat_43_olseek 19
28 -#define TARGET_NETBSD_NR_getpid 20
29 -#define TARGET_NETBSD_NR_getpid 20
30 -#define TARGET_NETBSD_NR_compat_40_mount 21
31 -#define TARGET_NETBSD_NR_unmount 22
32 -#define TARGET_NETBSD_NR_setuid 23
33 -#define TARGET_NETBSD_NR_getuid 24
34 -#define TARGET_NETBSD_NR_getuid 24
35 -#define TARGET_NETBSD_NR_geteuid 25
36 -#define TARGET_NETBSD_NR_ptrace 26
37 -#define TARGET_NETBSD_NR_recvmsg 27
38 -#define TARGET_NETBSD_NR_sendmsg 28
39 -#define TARGET_NETBSD_NR_recvfrom 29
40 -#define TARGET_NETBSD_NR_accept 30
41 -#define TARGET_NETBSD_NR_getpeername 31
42 -#define TARGET_NETBSD_NR_getsockname 32
43 -#define TARGET_NETBSD_NR_access 33
44 -#define TARGET_NETBSD_NR_chflags 34
45 -#define TARGET_NETBSD_NR_fchflags 35
46 -#define TARGET_NETBSD_NR_sync 36
47 -#define TARGET_NETBSD_NR_kill 37
48 -#define TARGET_NETBSD_NR_compat_43_stat43 38
49 -#define TARGET_NETBSD_NR_getppid 39
50 -#define TARGET_NETBSD_NR_compat_43_lstat43 40
51 -#define TARGET_NETBSD_NR_dup 41
52 -#define TARGET_NETBSD_NR_pipe 42
53 -#define TARGET_NETBSD_NR_getegid 43
54 -#define TARGET_NETBSD_NR_profil 44
55 -#define TARGET_NETBSD_NR_ktrace 45
56 -#define TARGET_NETBSD_NR_compat_13_sigaction13 46
57 -#define TARGET_NETBSD_NR_getgid 47
58 -#define TARGET_NETBSD_NR_getgid 47
59 -#define TARGET_NETBSD_NR_compat_13_sigprocmask13 48
60 -#define TARGET_NETBSD_NR___getlogin 49
61 -#define TARGET_NETBSD_NR___setlogin 50
62 -#define TARGET_NETBSD_NR_acct 51
63 -#define TARGET_NETBSD_NR_compat_13_sigpending13 52
64 -#define TARGET_NETBSD_NR_compat_13_sigaltstack13 53
65 -#define TARGET_NETBSD_NR_ioctl 54
66 -#define TARGET_NETBSD_NR_compat_12_oreboot 55
67 -#define TARGET_NETBSD_NR_revoke 56
68 -#define TARGET_NETBSD_NR_symlink 57
69 -#define TARGET_NETBSD_NR_readlink 58
70 -#define TARGET_NETBSD_NR_execve 59
71 -#define TARGET_NETBSD_NR_umask 60
72 -#define TARGET_NETBSD_NR_chroot 61
73 -#define TARGET_NETBSD_NR_compat_43_fstat43 62
74 -#define TARGET_NETBSD_NR_compat_43_ogetkerninfo 63
75 -#define TARGET_NETBSD_NR_compat_43_ogetpagesize 64
76 -#define TARGET_NETBSD_NR_compat_12_msync 65
77 -#define TARGET_NETBSD_NR_vfork 66
78 -#define TARGET_NETBSD_NR_sbrk 69
79 -#define TARGET_NETBSD_NR_sstk 70
80 -#define TARGET_NETBSD_NR_compat_43_ommap 71
81 -#define TARGET_NETBSD_NR_vadvise 72
82 -#define TARGET_NETBSD_NR_munmap 73
83 -#define TARGET_NETBSD_NR_mprotect 74
84 -#define TARGET_NETBSD_NR_madvise 75
85 -#define TARGET_NETBSD_NR_mincore 78
86 -#define TARGET_NETBSD_NR_getgroups 79
87 -#define TARGET_NETBSD_NR_setgroups 80
88 -#define TARGET_NETBSD_NR_getpgrp 81
89 -#define TARGET_NETBSD_NR_setpgid 82
90 -#define TARGET_NETBSD_NR_setitimer 83
91 -#define TARGET_NETBSD_NR_compat_43_owait 84
92 -#define TARGET_NETBSD_NR_compat_12_oswapon 85
93 -#define TARGET_NETBSD_NR_getitimer 86
94 -#define TARGET_NETBSD_NR_compat_43_ogethostname 87
95 -#define TARGET_NETBSD_NR_compat_43_osethostname 88
96 -#define TARGET_NETBSD_NR_compat_43_ogetdtablesize 89
97 -#define TARGET_NETBSD_NR_dup2 90
98 -#define TARGET_NETBSD_NR_fcntl 92
99 -#define TARGET_NETBSD_NR_select 93
100 -#define TARGET_NETBSD_NR_fsync 95
101 -#define TARGET_NETBSD_NR_setpriority 96
102 -#define TARGET_NETBSD_NR_compat_30_socket 97
103 -#define TARGET_NETBSD_NR_connect 98
104 -#define TARGET_NETBSD_NR_compat_43_oaccept 99
105 -#define TARGET_NETBSD_NR_getpriority 100
106 -#define TARGET_NETBSD_NR_compat_43_osend 101
107 -#define TARGET_NETBSD_NR_compat_43_orecv 102
108 -#define TARGET_NETBSD_NR_compat_13_sigreturn13 103
109 -#define TARGET_NETBSD_NR_bind 104
110 -#define TARGET_NETBSD_NR_setsockopt 105
111 -#define TARGET_NETBSD_NR_listen 106
112 -#define TARGET_NETBSD_NR_compat_43_osigvec 108
113 -#define TARGET_NETBSD_NR_compat_43_osigblock 109
114 -#define TARGET_NETBSD_NR_compat_43_osigsetmask 110
115 -#define TARGET_NETBSD_NR_compat_13_sigsuspend13 111
116 -#define TARGET_NETBSD_NR_compat_43_osigstack 112
117 -#define TARGET_NETBSD_NR_compat_43_orecvmsg 113
118 -#define TARGET_NETBSD_NR_compat_43_osendmsg 114
119 -#define TARGET_NETBSD_NR_gettimeofday 116
120 -#define TARGET_NETBSD_NR_getrusage 117
121 -#define TARGET_NETBSD_NR_getsockopt 118
122 -#define TARGET_NETBSD_NR_readv 120
123 -#define TARGET_NETBSD_NR_writev 121
124 -#define TARGET_NETBSD_NR_settimeofday 122
125 -#define TARGET_NETBSD_NR_fchown 123
126 -#define TARGET_NETBSD_NR_fchmod 124
127 -#define TARGET_NETBSD_NR_compat_43_orecvfrom 125
128 -#define TARGET_NETBSD_NR_setreuid 126
129 -#define TARGET_NETBSD_NR_setregid 127
130 -#define TARGET_NETBSD_NR_rename 128
131 -#define TARGET_NETBSD_NR_compat_43_otruncate 129
132 -#define TARGET_NETBSD_NR_compat_43_oftruncate 130
133 -#define TARGET_NETBSD_NR_flock 131
134 -#define TARGET_NETBSD_NR_mkfifo 132
135 -#define TARGET_NETBSD_NR_sendto 133
136 -#define TARGET_NETBSD_NR_shutdown 134
137 -#define TARGET_NETBSD_NR_socketpair 135
138 -#define TARGET_NETBSD_NR_mkdir 136
139 -#define TARGET_NETBSD_NR_rmdir 137
140 -#define TARGET_NETBSD_NR_utimes 138
141 -#define TARGET_NETBSD_NR_adjtime 140
142 -#define TARGET_NETBSD_NR_compat_43_ogetpeername 141
143 -#define TARGET_NETBSD_NR_compat_43_ogethostid 142
144 -#define TARGET_NETBSD_NR_compat_43_osethostid 143
145 -#define TARGET_NETBSD_NR_compat_43_ogetrlimit 144
146 -#define TARGET_NETBSD_NR_compat_43_osetrlimit 145
147 -#define TARGET_NETBSD_NR_compat_43_okillpg 146
148 -#define TARGET_NETBSD_NR_setsid 147
149 -#define TARGET_NETBSD_NR_quotactl 148
150 -#define TARGET_NETBSD_NR_compat_43_oquota 149
151 -#define TARGET_NETBSD_NR_compat_43_ogetsockname 150
152 -#define TARGET_NETBSD_NR_nfssvc 155
153 -#define TARGET_NETBSD_NR_compat_43_ogetdirentries 156
154 -#define TARGET_NETBSD_NR_compat_20_statfs 157
155 -#define TARGET_NETBSD_NR_compat_20_fstatfs 158
156 -#define TARGET_NETBSD_NR_compat_30_getfh 161
157 -#define TARGET_NETBSD_NR_compat_09_ogetdomainname 162
158 -#define TARGET_NETBSD_NR_compat_09_osetdomainname 163
159 -#define TARGET_NETBSD_NR_compat_09_ouname 164
160 -#define TARGET_NETBSD_NR_sysarch 165
161 -#define TARGET_NETBSD_NR_compat_10_osemsys 169
162 -#define TARGET_NETBSD_NR_compat_10_omsgsys 170
163 -#define TARGET_NETBSD_NR_compat_10_oshmsys 171
164 -#define TARGET_NETBSD_NR_pread 173
165 -#define TARGET_NETBSD_NR_pwrite 174
166 -#define TARGET_NETBSD_NR_compat_30_ntp_gettime 175
167 -#define TARGET_NETBSD_NR_ntp_adjtime 176
168 -#define TARGET_NETBSD_NR_setgid 181
169 -#define TARGET_NETBSD_NR_setegid 182
170 -#define TARGET_NETBSD_NR_seteuid 183
171 -#define TARGET_NETBSD_NR_lfs_bmapv 184
172 -#define TARGET_NETBSD_NR_lfs_markv 185
173 -#define TARGET_NETBSD_NR_lfs_segclean 186
174 -#define TARGET_NETBSD_NR_lfs_segwait 187
175 -#define TARGET_NETBSD_NR_compat_12_stat12 188
176 -#define TARGET_NETBSD_NR_compat_12_fstat12 189
177 -#define TARGET_NETBSD_NR_compat_12_lstat12 190
178 -#define TARGET_NETBSD_NR_pathconf 191
179 -#define TARGET_NETBSD_NR_fpathconf 192
180 -#define TARGET_NETBSD_NR_getrlimit 194
181 -#define TARGET_NETBSD_NR_setrlimit 195
182 -#define TARGET_NETBSD_NR_compat_12_getdirentries 196
183 -#define TARGET_NETBSD_NR_mmap 197
184 -#define TARGET_NETBSD_NR___syscall 198
185 -#define TARGET_NETBSD_NR_lseek 199
186 -#define TARGET_NETBSD_NR_truncate 200
187 -#define TARGET_NETBSD_NR_ftruncate 201
188 -#define TARGET_NETBSD_NR___sysctl 202
189 -#define TARGET_NETBSD_NR_mlock 203
190 -#define TARGET_NETBSD_NR_munlock 204
191 -#define TARGET_NETBSD_NR_undelete 205
192 -#define TARGET_NETBSD_NR_futimes 206
193 -#define TARGET_NETBSD_NR_getpgid 207
194 -#define TARGET_NETBSD_NR_reboot 208
195 -#define TARGET_NETBSD_NR_poll 209
196 -#define TARGET_NETBSD_NR_compat_14___semctl 220
197 -#define TARGET_NETBSD_NR_semget 221
198 -#define TARGET_NETBSD_NR_semop 222
199 -#define TARGET_NETBSD_NR_semconfig 223
200 -#define TARGET_NETBSD_NR_compat_14_msgctl 224
201 -#define TARGET_NETBSD_NR_msgget 225
202 -#define TARGET_NETBSD_NR_msgsnd 226
203 -#define TARGET_NETBSD_NR_msgrcv 227
204 -#define TARGET_NETBSD_NR_shmat 228
205 -#define TARGET_NETBSD_NR_compat_14_shmctl 229
206 -#define TARGET_NETBSD_NR_shmdt 230
207 -#define TARGET_NETBSD_NR_shmget 231
208 -#define TARGET_NETBSD_NR_clock_gettime 232
209 -#define TARGET_NETBSD_NR_clock_settime 233
210 -#define TARGET_NETBSD_NR_clock_getres 234
211 -#define TARGET_NETBSD_NR_timer_create 235
212 -#define TARGET_NETBSD_NR_timer_delete 236
213 -#define TARGET_NETBSD_NR_timer_settime 237
214 -#define TARGET_NETBSD_NR_timer_gettime 238
215 -#define TARGET_NETBSD_NR_timer_getoverrun 239
216 -#define TARGET_NETBSD_NR_nanosleep 240
217 -#define TARGET_NETBSD_NR_fdatasync 241
218 -#define TARGET_NETBSD_NR_mlockall 242
219 -#define TARGET_NETBSD_NR_munlockall 243
220 -#define TARGET_NETBSD_NR___sigtimedwait 244
221 -#define TARGET_NETBSD_NR_modctl 246
222 -#define TARGET_NETBSD_NR__ksem_init 247
223 -#define TARGET_NETBSD_NR__ksem_open 248
224 -#define TARGET_NETBSD_NR__ksem_unlink 249
225 -#define TARGET_NETBSD_NR__ksem_close 250
226 -#define TARGET_NETBSD_NR__ksem_post 251
227 -#define TARGET_NETBSD_NR__ksem_wait 252
228 -#define TARGET_NETBSD_NR__ksem_trywait 253
229 -#define TARGET_NETBSD_NR__ksem_getvalue 254
230 -#define TARGET_NETBSD_NR__ksem_destroy 255
231 -#define TARGET_NETBSD_NR_mq_open 257
232 -#define TARGET_NETBSD_NR_mq_close 258
233 -#define TARGET_NETBSD_NR_mq_unlink 259
234 -#define TARGET_NETBSD_NR_mq_getattr 260
235 -#define TARGET_NETBSD_NR_mq_setattr 261
236 -#define TARGET_NETBSD_NR_mq_notify 262
237 -#define TARGET_NETBSD_NR_mq_send 263
238 -#define TARGET_NETBSD_NR_mq_receive 264
239 -#define TARGET_NETBSD_NR_mq_timedsend 265
240 -#define TARGET_NETBSD_NR_mq_timedreceive 266
241 -#define TARGET_NETBSD_NR___posix_rename 270
242 -#define TARGET_NETBSD_NR_swapctl 271
243 -#define TARGET_NETBSD_NR_compat_30_getdents 272
244 -#define TARGET_NETBSD_NR_minherit 273
245 -#define TARGET_NETBSD_NR_lchmod 274
246 -#define TARGET_NETBSD_NR_lchown 275
247 -#define TARGET_NETBSD_NR_lutimes 276
248 -#define TARGET_NETBSD_NR___msync13 277
249 -#define TARGET_NETBSD_NR_compat_30___stat13 278
250 -#define TARGET_NETBSD_NR_compat_30___fstat13 279
251 -#define TARGET_NETBSD_NR_compat_30___lstat13 280
252 -#define TARGET_NETBSD_NR___sigaltstack14 281
253 -#define TARGET_NETBSD_NR___vfork14 282
254 -#define TARGET_NETBSD_NR___posix_chown 283
255 -#define TARGET_NETBSD_NR___posix_fchown 284
256 -#define TARGET_NETBSD_NR___posix_lchown 285
257 -#define TARGET_NETBSD_NR_getsid 286
258 -#define TARGET_NETBSD_NR___clone 287
259 -#define TARGET_NETBSD_NR_fktrace 288
260 -#define TARGET_NETBSD_NR_preadv 289
261 -#define TARGET_NETBSD_NR_pwritev 290
262 -#define TARGET_NETBSD_NR_compat_16___sigaction14 291
263 -#define TARGET_NETBSD_NR___sigpending14 292
264 -#define TARGET_NETBSD_NR___sigprocmask14 293
265 -#define TARGET_NETBSD_NR___sigsuspend14 294
266 -#define TARGET_NETBSD_NR_compat_16___sigreturn14 295
267 -#define TARGET_NETBSD_NR___getcwd 296
268 -#define TARGET_NETBSD_NR_fchroot 297
269 -#define TARGET_NETBSD_NR_compat_30_fhopen 298
270 -#define TARGET_NETBSD_NR_compat_30_fhstat 299
271 -#define TARGET_NETBSD_NR_compat_20_fhstatfs 300
272 -#define TARGET_NETBSD_NR_____semctl13 301
273 -#define TARGET_NETBSD_NR___msgctl13 302
274 -#define TARGET_NETBSD_NR___shmctl13 303
275 -#define TARGET_NETBSD_NR_lchflags 304
276 -#define TARGET_NETBSD_NR_issetugid 305
277 -#define TARGET_NETBSD_NR_utrace 306
278 -#define TARGET_NETBSD_NR_getcontext 307
279 -#define TARGET_NETBSD_NR_setcontext 308
280 -#define TARGET_NETBSD_NR__lwp_create 309
281 -#define TARGET_NETBSD_NR__lwp_exit 310
282 -#define TARGET_NETBSD_NR__lwp_self 311
283 -#define TARGET_NETBSD_NR__lwp_wait 312
284 -#define TARGET_NETBSD_NR__lwp_suspend 313
285 -#define TARGET_NETBSD_NR__lwp_continue 314
286 -#define TARGET_NETBSD_NR__lwp_wakeup 315
287 -#define TARGET_NETBSD_NR__lwp_getprivate 316
288 -#define TARGET_NETBSD_NR__lwp_setprivate 317
289 -#define TARGET_NETBSD_NR__lwp_kill 318
290 -#define TARGET_NETBSD_NR__lwp_detach 319
291 -#define TARGET_NETBSD_NR__lwp_park 320
292 -#define TARGET_NETBSD_NR__lwp_unpark 321
293 -#define TARGET_NETBSD_NR__lwp_unpark_all 322
294 -#define TARGET_NETBSD_NR__lwp_setname 323
295 -#define TARGET_NETBSD_NR__lwp_getname 324
296 -#define TARGET_NETBSD_NR__lwp_ctl 325
297 -#define TARGET_NETBSD_NR_sa_register 330
298 -#define TARGET_NETBSD_NR_sa_stacks 331
299 -#define TARGET_NETBSD_NR_sa_enable 332
300 -#define TARGET_NETBSD_NR_sa_setconcurrency 333
301 -#define TARGET_NETBSD_NR_sa_yield 334
302 -#define TARGET_NETBSD_NR_sa_preempt 335
303 -#define TARGET_NETBSD_NR_sa_unblockyield 336
304 -#define TARGET_NETBSD_NR___sigaction_sigtramp 340
305 -#define TARGET_NETBSD_NR_pmc_get_info 341
306 -#define TARGET_NETBSD_NR_pmc_control 342
307 -#define TARGET_NETBSD_NR_rasctl 343
308 -#define TARGET_NETBSD_NR_kqueue 344
309 -#define TARGET_NETBSD_NR_kevent 345
310 -#define TARGET_NETBSD_NR__sched_setparam 346
311 -#define TARGET_NETBSD_NR__sched_getparam 347
312 -#define TARGET_NETBSD_NR__sched_setaffinity 348
313 -#define TARGET_NETBSD_NR__sched_getaffinity 349
314 -#define TARGET_NETBSD_NR_sched_yield 350
315 -#define TARGET_NETBSD_NR_fsync_range 354
316 -#define TARGET_NETBSD_NR_uuidgen 355
317 -#define TARGET_NETBSD_NR_getvfsstat 356
318 -#define TARGET_NETBSD_NR_statvfs1 357
319 -#define TARGET_NETBSD_NR_fstatvfs1 358
320 -#define TARGET_NETBSD_NR_compat_30_fhstatvfs1 359
321 -#define TARGET_NETBSD_NR_extattrctl 360
322 -#define TARGET_NETBSD_NR_extattr_set_file 361
323 -#define TARGET_NETBSD_NR_extattr_get_file 362
324 -#define TARGET_NETBSD_NR_extattr_delete_file 363
325 -#define TARGET_NETBSD_NR_extattr_set_fd 364
326 -#define TARGET_NETBSD_NR_extattr_get_fd 365
327 -#define TARGET_NETBSD_NR_extattr_delete_fd 366
328 -#define TARGET_NETBSD_NR_extattr_set_link 367
329 -#define TARGET_NETBSD_NR_extattr_get_link 368
330 -#define TARGET_NETBSD_NR_extattr_delete_link 369
331 -#define TARGET_NETBSD_NR_extattr_list_fd 370
332 -#define TARGET_NETBSD_NR_extattr_list_file 371
333 -#define TARGET_NETBSD_NR_extattr_list_link 372
334 -#define TARGET_NETBSD_NR_pselect 373
335 -#define TARGET_NETBSD_NR_pollts 374
336 -#define TARGET_NETBSD_NR_setxattr 375
337 -#define TARGET_NETBSD_NR_lsetxattr 376
338 -#define TARGET_NETBSD_NR_fsetxattr 377
339 -#define TARGET_NETBSD_NR_getxattr 378
340 -#define TARGET_NETBSD_NR_lgetxattr 379
341 -#define TARGET_NETBSD_NR_fgetxattr 380
342 -#define TARGET_NETBSD_NR_listxattr 381
343 -#define TARGET_NETBSD_NR_llistxattr 382
344 -#define TARGET_NETBSD_NR_flistxattr 383
345 -#define TARGET_NETBSD_NR_removexattr 384
346 -#define TARGET_NETBSD_NR_lremovexattr 385
347 -#define TARGET_NETBSD_NR_fremovexattr 386
348 -#define TARGET_NETBSD_NR___stat30 387
349 -#define TARGET_NETBSD_NR___fstat30 388
350 -#define TARGET_NETBSD_NR___lstat30 389
351 -#define TARGET_NETBSD_NR___getdents30 390
352 -#define TARGET_NETBSD_NR_compat_30___fhstat30 392
353 -#define TARGET_NETBSD_NR___ntp_gettime30 393
354 -#define TARGET_NETBSD_NR___socket30 394
355 -#define TARGET_NETBSD_NR___getfh30 395
356 -#define TARGET_NETBSD_NR___fhopen40 396
357 -#define TARGET_NETBSD_NR___fhstatvfs140 397
358 -#define TARGET_NETBSD_NR___fhstat40 398
359 -#define TARGET_NETBSD_NR_aio_cancel 399
360 -#define TARGET_NETBSD_NR_aio_error 400
361 -#define TARGET_NETBSD_NR_aio_fsync 401
362 -#define TARGET_NETBSD_NR_aio_read 402
363 -#define TARGET_NETBSD_NR_aio_return 403
364 -#define TARGET_NETBSD_NR_aio_suspend 404
365 -#define TARGET_NETBSD_NR_aio_write 405
366 -#define TARGET_NETBSD_NR_lio_listio 406
367 -#define TARGET_NETBSD_NR___mount50 410
368 -#define TARGET_NETBSD_NR_mremap 411
369 -#define TARGET_NETBSD_NR_pset_create 412
370 -#define TARGET_NETBSD_NR_pset_destroy 413
371 -#define TARGET_NETBSD_NR_pset_assign 414
372 -#define TARGET_NETBSD_NR__pset_bind 415
373 -#define TARGET_NETBSD_NR___posix_fadvise50 416
bsd-user/netbsd/target_os_elf.h deleted
-148
@@ -1,148 +0,0 @@
1 -/*
2 - * netbsd ELF definitions
3 - *
4 - * Copyright (c) 2013 Stacey D. Son
5 - *
6 - * This program is free software; you can redistribute it and/or modify
7 - * it under the terms of the GNU General Public License as published by
8 - * the Free Software Foundation; either version 2 of the License, or
9 - * (at your option) any later version.
10 - *
11 - * This program is distributed in the hope that it will be useful,
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 - * GNU General Public License for more details.
15 - *
16 - * You should have received a copy of the GNU General Public License
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 - */
19 -
20 -#ifndef TARGET_OS_ELF_H
21 -#define TARGET_OS_ELF_H
22 -
23 -#include "target_arch_elf.h"
24 -#include "elf.h"
25 -#include "user/tswap-target.h"
26 -
27 -/* this flag is uneffective under linux too, should be deleted */
28 -#ifndef MAP_DENYWRITE
29 -#define MAP_DENYWRITE 0
30 -#endif
31 -
32 -/* should probably go in elf.h */
33 -#ifndef ELIBBAD
34 -#define ELIBBAD 80
35 -#endif
36 -
37 -#ifndef ELF_PLATFORM
38 -#define ELF_PLATFORM (NULL)
39 -#endif
40 -
41 -#ifndef ELF_HWCAP
42 -#define ELF_HWCAP 0
43 -#endif
44 -
45 -#ifdef TARGET_ABI32
46 -#undef ELF_CLASS
47 -#define ELF_CLASS ELFCLASS32
48 -#undef bswaptls
49 -#define bswaptls(ptr) bswap32s(ptr)
50 -#endif
51 -
52 -/* max code+data+bss space allocated to elf interpreter */
53 -#define INTERP_MAP_SIZE (32 * 1024 * 1024)
54 -
55 -/* max code+data+bss+brk space allocated to ET_DYN executables */
56 -#define ET_DYN_MAP_SIZE (128 * 1024 * 1024)
57 -
58 -/* Necessary parameters */
59 -#define TARGET_ELF_EXEC_PAGESIZE TARGET_PAGE_SIZE
60 -#define TARGET_ELF_PAGESTART(_v) ((_v) & \
61 - ~(unsigned long)(TARGET_ELF_EXEC_PAGESIZE - 1))
62 -#define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE - 1))
63 -
64 -#define DLINFO_ITEMS 12
65 -
66 -static abi_ulong target_create_elf_tables(abi_ulong p, int argc, int envc,
67 - abi_ulong stringp,
68 - struct elfhdr *exec,
69 - abi_ulong load_addr,
70 - abi_ulong load_bias,
71 - abi_ulong interp_load_addr,
72 - struct image_info *info)
73 -{
74 - abi_ulong sp;
75 - int size;
76 - abi_ulong u_platform;
77 - const char *k_platform;
78 - const int n = sizeof(elf_addr_t);
79 -
80 - sp = p;
81 - u_platform = 0;
82 - k_platform = ELF_PLATFORM;
83 - if (k_platform) {
84 - size_t len = strlen(k_platform) + 1;
85 - sp -= (len + n - 1) & ~(n - 1);
86 - u_platform = sp;
87 - /* FIXME - check return value of memcpy_to_target() for failure */
88 - memcpy_to_target(sp, k_platform, len);
89 - }
90 - /*
91 - * Force 16 byte _final_ alignment here for generality.
92 - */
93 - sp = sp & ~(abi_ulong)15;
94 - size = (DLINFO_ITEMS + 1) * 2;
95 - if (k_platform) {
96 - size += 2;
97 - }
98 -#ifdef DLINFO_ARCH_ITEMS
99 - size += DLINFO_ARCH_ITEMS * 2;
100 -#endif
101 - size += envc + argc + 2;
102 - size += 1; /* argc itself */
103 - size *= n;
104 - if (size & 15) {
105 - sp -= 16 - (size & 15);
106 - }
107 -
108 - /*
109 - * NetBSD defines elf_addr_t as Elf32_Off / Elf64_Off
110 - */
111 -#define NEW_AUX_ENT(id, val) do { \
112 - sp -= n; put_user_ual(val, sp); \
113 - sp -= n; put_user_ual(id, sp); \
114 - } while (0)
115 -
116 - NEW_AUX_ENT(AT_NULL, 0);
117 -
118 - /* There must be exactly DLINFO_ITEMS entries here. */
119 - NEW_AUX_ENT(AT_PHDR, (abi_ulong)(load_addr + exec->e_phoff));
120 - NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof(struct elf_phdr)));
121 - NEW_AUX_ENT(AT_PHNUM, (abi_ulong)(exec->e_phnum));
122 - NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(TARGET_PAGE_SIZE));
123 - NEW_AUX_ENT(AT_BASE, (abi_ulong)(interp_load_addr));
124 - NEW_AUX_ENT(AT_FLAGS, (abi_ulong)0);
125 - NEW_AUX_ENT(AT_ENTRY, load_bias + exec->e_entry);
126 - NEW_AUX_ENT(AT_UID, (abi_ulong)getuid());
127 - NEW_AUX_ENT(AT_EUID, (abi_ulong)geteuid());
128 - NEW_AUX_ENT(AT_GID, (abi_ulong)getgid());
129 - NEW_AUX_ENT(AT_EGID, (abi_ulong)getegid());
130 - NEW_AUX_ENT(AT_HWCAP, (abi_ulong)ELF_HWCAP);
131 - NEW_AUX_ENT(AT_CLKTCK, (abi_ulong)sysconf(_SC_CLK_TCK));
132 - if (k_platform) {
133 - NEW_AUX_ENT(AT_PLATFORM, u_platform);
134 - }
135 -#ifdef ARCH_DLINFO
136 - /*
137 - * ARCH_DLINFO must come last so platform specific code can enforce
138 - * special alignment requirements on the AUXV if necessary (eg. PPC).
139 - */
140 - ARCH_DLINFO;
141 -#endif
142 -#undef NEW_AUX_ENT
143 -
144 - sp = loader_build_argptr(envc, argc, sp, stringp);
145 - return sp;
146 -}
147 -
148 -#endif /* TARGET_OS_ELF_H */
bsd-user/netbsd/target_os_siginfo.h deleted
-82
@@ -1,82 +0,0 @@
1 -#ifndef TARGET_OS_SIGINFO_H
2 -#define TARGET_OS_SIGINFO_H
3 -
4 -#define TARGET_NSIG 32 /* counting 0; could be 33 (mask is 1-32) */
5 -#define TARGET_NSIG_BPW (sizeof(uint32_t) * 8)
6 -#define TARGET_NSIG_WORDS (TARGET_NSIG / TARGET_NSIG_BPW)
7 -
8 -/* this struct defines a stack used during syscall handling */
9 -typedef struct target_sigaltstack {
10 - abi_long ss_sp;
11 - abi_ulong ss_size;
12 - abi_long ss_flags;
13 -} target_stack_t;
14 -
15 -typedef struct {
16 - uint32_t __bits[TARGET_NSIG_WORDS];
17 -} target_sigset_t
18 -
19 -struct target_sigaction {
20 - abi_ulong _sa_handler;
21 - int32_t sa_flags;
22 - target_sigset_t sa_mask;
23 -};
24 -
25 -/* Compare to sys/siginfo.h */
26 -typedef union target_sigval {
27 - int sival_int;
28 - abi_ulong sival_ptr;
29 -} target_sigval_t;
30 -
31 -struct target_ksiginfo {
32 - int32_t _signo;
33 - int32_t _code;
34 - int32_t _errno;
35 -#if TARGET_ABI_BITS == 64
36 - int32_t _pad;
37 -#endif
38 - union {
39 - struct {
40 - int32_t _pid;
41 - int32_t _uid;
42 - target_sigval_t _value;
43 - } _rt;
44 -
45 - struct {
46 - int32_t _pid;
47 - int32_t _uid;
48 - int32_t _struct;
49 - /* clock_t _utime; */
50 - /* clock_t _stime; */
51 - } _child;
52 -
53 - struct {
54 - abi_ulong _addr;
55 - int32_t _trap;
56 - } _fault;
57 -
58 - struct {
59 - long _band;
60 - int _fd;
61 - } _poll;
62 - } _reason;
63 -};
64 -
65 -typedef union target_siginfo {
66 - int8_t si_pad[128];
67 - struct target_ksiginfo _info;
68 -} target_siginfo_t;
69 -
70 -#define target_si_signo _info._signo
71 -#define target_si_code _info._code
72 -#define target_si_errno _info._errno
73 -#define target_si_addr _info._reason._fault._addr
74 -
75 -#define TARGET_SEGV_MAPERR 1
76 -#define TARGET_SEGV_ACCERR 2
77 -
78 -#define TARGET_TRAP_BRKPT 1
79 -#define TARGET_TRAP_TRACE 2
80 -
81 -
82 -#endif /* TARGET_OS_SIGINFO_H */
bsd-user/netbsd/target_os_signal.h deleted
-69
@@ -1,69 +0,0 @@
1 -#ifndef TARGET_OS_SIGNAL_H
2 -#define TARGET_OS_SIGNAL_H
3 -
4 -#include "target_os_siginfo.h"
5 -#include "target_arch_signal.h"
6 -
7 -#define TARGET_SIGHUP 1 /* hangup */
8 -#define TARGET_SIGINT 2 /* interrupt */
9 -#define TARGET_SIGQUIT 3 /* quit */
10 -#define TARGET_SIGILL 4 /* illegal instruction (not reset when caught) */
11 -#define TARGET_SIGTRAP 5 /* trace trap (not reset when caught) */
12 -#define TARGET_SIGABRT 6 /* abort() */
13 -#define TARGET_SIGIOT SIGABRT /* compatibility */
14 -#define TARGET_SIGEMT 7 /* EMT instruction */
15 -#define TARGET_SIGFPE 8 /* floating point exception */
16 -#define TARGET_SIGKILL 9 /* kill (cannot be caught or ignored) */
17 -#define TARGET_SIGBUS 10 /* bus error */
18 -#define TARGET_SIGSEGV 11 /* segmentation violation */
19 -#define TARGET_SIGSYS 12 /* bad argument to system call */
20 -#define TARGET_SIGPIPE 13 /* write on a pipe with no one to read it */
21 -#define TARGET_SIGALRM 14 /* alarm clock */
22 -#define TARGET_SIGTERM 15 /* software termination signal from kill */
23 -#define TARGET_SIGURG 16 /* urgent condition on IO channel */
24 -#define TARGET_SIGSTOP 17 /* sendable stop signal not from tty */
25 -#define TARGET_SIGTSTP 18 /* stop signal from tty */
26 -#define TARGET_SIGCONT 19 /* continue a stopped process */
27 -#define TARGET_SIGCHLD 20 /* to parent on child stop or exit */
28 -#define TARGET_SIGTTIN 21 /* to readers pgrp upon background tty read */
29 -#define TARGET_SIGTTOU 22 /* like TTIN for out if (tp->t_local&LTOSTOP) */
30 -#define TARGET_SIGIO 23 /* input/output possible signal */
31 -#define TARGET_SIGXCPU 24 /* exceeded CPU time limit */
32 -#define TARGET_SIGXFSZ 25 /* exceeded file size limit */
33 -#define TARGET_SIGVTALRM 26 /* virtual time alarm */
34 -#define TARGET_SIGPROF 27 /* profiling time alarm */
35 -#define TARGET_SIGWINCH 28 /* window size changes */
36 -#define TARGET_SIGINFO 29 /* information request */
37 -#define TARGET_SIGUSR1 30 /* user defined signal 1 */
38 -#define TARGET_SIGUSR2 31 /* user defined signal 2 */
39 -
40 -/*
41 - * Language spec says we must list exactly one parameter, even though we
42 - * actually supply three. Ugh!
43 - */
44 -#define TARGET_SIG_DFL ((void (*)(int))0)
45 -#define TARGET_SIG_IGN ((void (*)(int))1)
46 -#define TARGET_SIG_ERR ((void (*)(int))-1)
47 -
48 -#define TARGET_SA_ONSTACK 0x0001 /* take signal on signal stack */
49 -#define TARGET_SA_RESTART 0x0002 /* restart system on signal return */
50 -#define TARGET_SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */
51 -#define TARGET_SA_NODEFER 0x0010 /* don't mask the signal we're delivering */
52 -#define TARGET_SA_NOCLDWAIT 0x0020 /* don't create zombies (assign to pid 1) */
53 -#define TARGET_SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */
54 -#define TARGET_SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
55 -#define TARGET_SA_SIGINFO 0x0040 /* generate siginfo_t */
56 -
57 -/*
58 - * Flags for sigprocmask:
59 - */
60 -#define TARGET_SIG_BLOCK 1 /* block specified signal set */
61 -#define TARGET_SIG_UNBLOCK 2 /* unblock specified signal set */
62 -#define TARGET_SIG_SETMASK 3 /* set specified signal set */
63 -
64 -#define TARGET_BADSIG SIG_ERR
65 -
66 -#define TARGET_SS_ONSTACK 0x0001 /* take signals on alternate stack */
67 -#define TARGET_SS_DISABLE 0x0004 /* disable taking signals on alternate stack */
68 -
69 -#endif /* TARGET_OS_SIGNAL_H */
bsd-user/netbsd/target_os_stack.h deleted
-56
@@ -1,56 +0,0 @@
1 -/*
2 - * NetBSD setup_initial_stack() implementation.
3 - *
4 - * Copyright (c) 2013-14 Stacey D. Son
5 - *
6 - * This program is free software; you can redistribute it and/or modify
7 - * it under the terms of the GNU General Public License as published by
8 - * the Free Software Foundation; either version 2 of the License, or
9 - * (at your option) any later version.
10 - *
11 - * This program is distributed in the hope that it will be useful,
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 - * GNU General Public License for more details.
15 - *
16 - * You should have received a copy of the GNU General Public License
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 - */
19 -
20 -#ifndef TARGET_OS_STACK_H
21 -#define TARGET_OS_STACK_H
22 -
23 -#include "target_arch_sigtramp.h"
24 -
25 -static inline int setup_initial_stack(struct bsd_binprm *bprm, abi_ulong *p,
26 - abi_ulong *stringp)
27 -{
28 - int i;
29 - abi_ulong stack_base;
30 -
31 - stack_base = (target_stkbas + target_stksiz) -
32 - MAX_ARG_PAGES * TARGET_PAGE_SIZE;
33 - if (p) {
34 - *p = stack_base;
35 - }
36 - if (stringp) {
37 - *stringp = stack_base;
38 - }
39 -
40 - for (i = 0; i < MAX_ARG_PAGES; i++) {
41 - if (bprm->page[i]) {
42 - info->rss++;
43 - if (!memcpy_to_target(stack_base, bprm->page[i],
44 - TARGET_PAGE_SIZE)) {
45 - errno = EFAULT;
46 - return -1;
47 - }
48 - g_free(bprm->page[i]);
49 - }
50 - stack_base += TARGET_PAGE_SIZE;
51 - }
52 -
53 - return 0;
54 -}
55 -
56 -#endif /* TARGET_OS_STACK_H */
bsd-user/netbsd/target_os_thread.h deleted
-25
@@ -1,25 +0,0 @@
1 -/*
2 - * NetBSD thread dependent code and definitions
3 - *
4 - * Copyright (c) 2013 Stacey D. Son
5 - *
6 - * This program is free software; you can redistribute it and/or modify
7 - * it under the terms of the GNU General Public License as published by
8 - * the Free Software Foundation; either version 2 of the License, or
9 - * (at your option) any later version.
10 - *
11 - * This program is distributed in the hope that it will be useful,
12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 - * GNU General Public License for more details.
15 - *
16 - * You should have received a copy of the GNU General Public License
17 - * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 - */
19 -
20 -#ifndef TARGET_OS_THREAD_H
21 -#define TARGET_OS_THREAD_H
22 -
23 -#include "target_arch_thread.h"
24 -
25 -#endif /* TARGET_OS_THREAD_H */
bsd-user/qemu.h
-8
@@ -179,9 +179,6 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
179 abi_long arg2, abi_long arg3, abi_long arg4,
180 abi_long arg5, abi_long arg6, abi_long arg7,
181 abi_long arg8);
182 -abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
183 - abi_long arg2, abi_long arg3, abi_long arg4,
184 - abi_long arg5, abi_long arg6);
182 void gemu_log(const char *fmt, ...) G_GNUC_PRINTF(1, 2);
183 extern __thread CPUState *thread_cpu;
184 char *target_strerror(int err);
@@ -207,11 +204,6 @@ print_freebsd_syscall(int num,
204 abi_long arg1, abi_long arg2, abi_long arg3,
205 abi_long arg4, abi_long arg5, abi_long arg6);
206 void print_freebsd_syscall_ret(int num, abi_long ret);
210 -void
211 -print_netbsd_syscall(int num,
212 - abi_long arg1, abi_long arg2, abi_long arg3,
213 - abi_long arg4, abi_long arg5, abi_long arg6);
214 -void print_netbsd_syscall_ret(int num, abi_long ret);
207 /**
208 * print_taken_signal:
209 * @target_signum: target signal being taken
bsd-user/strace.c
-17
@@ -153,9 +153,6 @@ static void print_syscall_ret_addr(const struct syscallname *name, abi_long ret)
153 static const struct syscallname freebsd_scnames[] = {
154 #include "freebsd/strace.list"
155 };
156 -static const struct syscallname netbsd_scnames[] = {
157 -#include "netbsd/strace.list"
158 -};
156
157 static void print_syscall(int num, const struct syscallname *scnames,
158 unsigned int nscnames, abi_long arg1, abi_long arg2, abi_long arg3,
@@ -227,20 +224,6 @@ void print_freebsd_syscall_ret(int num, abi_long ret)
224 print_syscall_ret(num, ret, freebsd_scnames, ARRAY_SIZE(freebsd_scnames));
225 }
226
230 -void print_netbsd_syscall(int num, abi_long arg1, abi_long arg2, abi_long arg3,
231 - abi_long arg4, abi_long arg5, abi_long arg6)
232 -{
233 -
234 - print_syscall(num, netbsd_scnames, ARRAY_SIZE(netbsd_scnames),
235 - arg1, arg2, arg3, arg4, arg5, arg6);
236 -}
237 -
238 -void print_netbsd_syscall_ret(int num, abi_long ret)
239 -{
240 -
241 - print_syscall_ret(num, ret, netbsd_scnames, ARRAY_SIZE(netbsd_scnames));
242 -}
243 -
227 static void
228 print_signal(abi_ulong arg, int last)
229 {
bsd-user/syscall_defs.h
-13
@@ -26,7 +26,6 @@
26 #include "errno_defs.h"
27
28 #include "freebsd/syscall_nr.h"
29 -#include "netbsd/syscall_nr.h"
29
30 /*
31 * machine/_types.h
@@ -107,18 +106,6 @@ struct bsd_shm_regions {
106
107 #define TARGET_FREEBSD_MAP_FLAGMASK 0x1ff7
108
110 -#define TARGET_NETBSD_MAP_INHERIT 0x0080 /* region is retained after */
111 - /* exec */
112 -#define TARGET_NETBSD_MAP_TRYFIXED 0x0400 /* attempt hint address, even */
113 - /* within break */
114 -#define TARGET_NETBSD_MAP_WIRED 0x0800 /* mlock() mapping when it is */
115 - /* established */
116 -
117 -#define TARGET_NETBSD_MAP_STACK 0x2000 /* allocated from memory, */
118 - /* swap space (stack) */
119 -
120 -#define TARGET_NETBSD_MAP_FLAGMASK 0x3ff7
121 -
109 /* XXX */
110 #define TARGET_BSD_MAP_FLAGMASK 0x3ff7
111