bsd-user: Remove OpenBSD-specific code
Remove the OpenBSD 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. I contacted the OpenBSD people in 2018, it appears, and even at that time they tought this code was not at all useful to them. Cc: Brad Smith <brad@comstyle.com> 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 07:55 UTC
90678cd379819295aa9f3913feee08ed05517b71
12 files changed
-853
bsd-user/openbsd/host-os.h
deleted
-25
@@ -1,25 +0,0 @@
1
-/*
2
- * OpenBSD 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_openbsd
24
-
25
-#endif /* HOST_OS_H */
bsd-user/openbsd/os-strace.h
deleted
-1
@@ -1 +0,0 @@
1
-/* XXX OpenBSD dependent strace print functions */
bsd-user/openbsd/strace.list
deleted
-187
@@ -1,187 +0,0 @@
1
-{ TARGET_OPENBSD_NR___getcwd, "__getcwd", NULL, NULL, NULL },
2
-{ TARGET_OPENBSD_NR___semctl, "__semctl", NULL, NULL, NULL },
3
-{ TARGET_OPENBSD_NR___syscall, "__syscall", NULL, NULL, NULL },
4
-{ TARGET_OPENBSD_NR___sysctl, "__sysctl", NULL, NULL, NULL },
5
-{ TARGET_OPENBSD_NR_accept, "accept", "%s(%d,%#x,%#x)", NULL, NULL },
6
-{ TARGET_OPENBSD_NR_access, "access", "%s(\"%s\",%#o)", NULL, NULL },
7
-{ TARGET_OPENBSD_NR_acct, "acct", NULL, NULL, NULL },
8
-{ TARGET_OPENBSD_NR_adjfreq, "adjfreq", NULL, NULL, NULL },
9
-{ TARGET_OPENBSD_NR_adjtime, "adjtime", NULL, NULL, NULL },
10
-{ TARGET_OPENBSD_NR_bind, "bind", NULL, NULL, NULL },
11
-{ TARGET_OPENBSD_NR_break, "break", NULL, NULL, NULL },
12
-{ TARGET_OPENBSD_NR_chdir, "chdir", "%s(\"%s\")", NULL, NULL },
13
-{ TARGET_OPENBSD_NR_chflags, "chflags", NULL, NULL, NULL },
14
-{ TARGET_OPENBSD_NR_chmod, "chmod", "%s(\"%s\",%#o)", NULL, NULL },
15
-{ TARGET_OPENBSD_NR_chown, "chown", NULL, NULL, NULL },
16
-{ TARGET_OPENBSD_NR_chroot, "chroot", NULL, NULL, NULL },
17
-{ TARGET_OPENBSD_NR_clock_getres, "clock_getres", NULL, NULL, NULL },
18
-{ TARGET_OPENBSD_NR_clock_gettime, "clock_gettime", NULL, NULL, NULL },
19
-{ TARGET_OPENBSD_NR_clock_settime, "clock_settime", NULL, NULL, NULL },
20
-{ TARGET_OPENBSD_NR_close, "close", "%s(%d)", NULL, NULL },
21
-{ TARGET_OPENBSD_NR_closefrom, "closefrom", NULL, NULL, NULL },
22
-{ TARGET_OPENBSD_NR_connect, "connect", "%s(%d,%#x,%d)", NULL, NULL },
23
-{ TARGET_OPENBSD_NR_dup, "dup", NULL, NULL, NULL },
24
-{ TARGET_OPENBSD_NR_dup2, "dup2", NULL, NULL, NULL },
25
-{ TARGET_OPENBSD_NR_execve, "execve", NULL, print_execve, NULL },
26
-{ TARGET_OPENBSD_NR_exit, "exit", "%s(%d)\n", NULL, NULL },
27
-{ TARGET_OPENBSD_NR_fchdir, "fchdir", NULL, NULL, NULL },
28
-{ TARGET_OPENBSD_NR_fchflags, "fchflags", NULL, NULL, NULL },
29
-{ TARGET_OPENBSD_NR_fchmod, "fchmod", "%s(%d,%#o)", NULL, NULL },
30
-{ TARGET_OPENBSD_NR_fchown, "fchown", "%s(\"%s\",%d,%d)", NULL, NULL },
31
-{ TARGET_OPENBSD_NR_fcntl, "fcntl", NULL, NULL, NULL },
32
-{ TARGET_OPENBSD_NR_fhopen, "fhopen", NULL, NULL, NULL },
33
-{ TARGET_OPENBSD_NR_fhstat, "fhstat", NULL, NULL, NULL },
34
-{ TARGET_OPENBSD_NR_fhstatfs, "fhstatfs", NULL, NULL, NULL },
35
-{ TARGET_OPENBSD_NR_flock, "flock", NULL, NULL, NULL },
36
-{ TARGET_OPENBSD_NR_fork, "fork", "%s()", NULL, NULL },
37
-{ TARGET_OPENBSD_NR_fpathconf, "fpathconf", NULL, NULL, NULL },
38
-{ TARGET_OPENBSD_NR_fstat, "fstat", "%s(%d,%p)", NULL, NULL },
39
-{ TARGET_OPENBSD_NR_fstatfs, "fstatfs", "%s(%d,%p)", NULL, NULL },
40
-{ TARGET_OPENBSD_NR_fsync, "fsync", NULL, NULL, NULL },
41
-{ TARGET_OPENBSD_NR_ftruncate, "ftruncate", NULL, NULL, NULL },
42
-{ TARGET_OPENBSD_NR_futimes, "futimes", NULL, NULL, NULL },
43
-{ TARGET_OPENBSD_NR_getdirentries, "getdirentries", NULL, NULL, NULL },
44
-{ TARGET_OPENBSD_NR_getegid, "getegid", "%s()", NULL, NULL },
45
-{ TARGET_OPENBSD_NR_geteuid, "geteuid", "%s()", NULL, NULL },
46
-{ TARGET_OPENBSD_NR_getfh, "getfh", NULL, NULL, NULL },
47
-{ TARGET_OPENBSD_NR_getfsstat, "getfsstat", NULL, NULL, NULL },
48
-{ TARGET_OPENBSD_NR_getgid, "getgid", "%s()", NULL, NULL },
49
-{ TARGET_OPENBSD_NR_getgroups, "getgroups", NULL, NULL, NULL },
50
-{ TARGET_OPENBSD_NR_getitimer, "getitimer", NULL, NULL, NULL },
51
-{ TARGET_OPENBSD_NR_getlogin, "getlogin", NULL, NULL, NULL },
52
-{ TARGET_OPENBSD_NR_getpeereid, "getpeereid", NULL, NULL, NULL },
53
-{ TARGET_OPENBSD_NR_getpeername, "getpeername", NULL, NULL, NULL },
54
-{ TARGET_OPENBSD_NR_getpgid, "getpgid", NULL, NULL, NULL },
55
-{ TARGET_OPENBSD_NR_getpgrp, "getpgrp", "%s()", NULL, NULL },
56
-{ TARGET_OPENBSD_NR_getpid, "getpid", "%s()", NULL, NULL },
57
-{ TARGET_OPENBSD_NR_getppid, "getppid", "%s()", NULL, NULL },
58
-{ TARGET_OPENBSD_NR_getpriority, "getpriority", "%s(%#x,%#x)", NULL, NULL },
59
-{ TARGET_OPENBSD_NR_getresgid, "getresgid", NULL, NULL, NULL },
60
-{ TARGET_OPENBSD_NR_getresuid, "getresuid", NULL, NULL, NULL },
61
-{ TARGET_OPENBSD_NR_getrlimit, "getrlimit", NULL, NULL, NULL },
62
-{ TARGET_OPENBSD_NR_getrusage, "getrusage", NULL, NULL, NULL },
63
-{ TARGET_OPENBSD_NR_getsid, "getsid", NULL, NULL, NULL },
64
-{ TARGET_OPENBSD_NR_getsockname, "getsockname", NULL, NULL, NULL },
65
-{ TARGET_OPENBSD_NR_getsockopt, "getsockopt", NULL, NULL, NULL },
66
-{ TARGET_OPENBSD_NR_getthrid, "getthrid", NULL, NULL, NULL },
67
-{ TARGET_OPENBSD_NR_gettimeofday, "gettimeofday", NULL, NULL, NULL },
68
-{ TARGET_OPENBSD_NR_getuid, "getuid", "%s()", NULL, NULL },
69
-{ TARGET_OPENBSD_NR_ioctl, "ioctl", NULL, NULL, NULL },
70
-{ TARGET_OPENBSD_NR_issetugid, "issetugid", "%s()", NULL, NULL },
71
-{ TARGET_OPENBSD_NR_kevent, "kevent", NULL, NULL, NULL },
72
-{ TARGET_OPENBSD_NR_kill, "kill", NULL, NULL, NULL },
73
-{ TARGET_OPENBSD_NR_kqueue, "kqueue", NULL, NULL, NULL },
74
-{ TARGET_OPENBSD_NR_ktrace, "ktrace", NULL, NULL, NULL },
75
-{ TARGET_OPENBSD_NR_lchown, "lchown", NULL, NULL, NULL },
76
-{ TARGET_OPENBSD_NR_lfs_bmapv, "lfs_bmapv", NULL, NULL, NULL },
77
-{ TARGET_OPENBSD_NR_lfs_markv, "lfs_markv", NULL, NULL, NULL },
78
-{ TARGET_OPENBSD_NR_lfs_segclean, "lfs_segclean", NULL, NULL, NULL },
79
-{ TARGET_OPENBSD_NR_lfs_segwait, "lfs_segwait", NULL, NULL, NULL },
80
-{ TARGET_OPENBSD_NR_link, "link", "%s(\"%s\",\"%s\")", NULL, NULL },
81
-{ TARGET_OPENBSD_NR_listen, "listen", NULL, NULL, NULL },
82
-{ TARGET_OPENBSD_NR_lseek, "lseek", NULL, NULL, NULL },
83
-{ TARGET_OPENBSD_NR_lstat, "lstat", "%s(\"%s\",%p)", NULL, NULL },
84
-{ TARGET_OPENBSD_NR_madvise, "madvise", NULL, NULL, NULL },
85
-{ TARGET_OPENBSD_NR_mincore, "mincore", NULL, NULL, NULL },
86
-{ TARGET_OPENBSD_NR_minherit, "minherit", NULL, NULL, NULL },
87
-{ TARGET_OPENBSD_NR_mkdir, "mkdir", "%s(\"%s\",%#o)", NULL, NULL },
88
-{ TARGET_OPENBSD_NR_mkfifo, "mkfifo", NULL, NULL, NULL },
89
-{ TARGET_OPENBSD_NR_mknod, "mknod", "%s(\"%s\",%#o,%#x)", NULL, NULL },
90
-{ TARGET_OPENBSD_NR_mlock, "mlock", NULL, NULL, NULL },
91
-{ TARGET_OPENBSD_NR_mlockall, "mlockall", NULL, NULL, NULL },
92
-{ TARGET_OPENBSD_NR_mmap, "mmap", NULL, NULL, print_syscall_ret_addr },
93
-{ TARGET_OPENBSD_NR_mount, "mount", NULL, NULL, NULL },
94
-{ TARGET_OPENBSD_NR_mprotect, "mprotect", "%s(%#x,%#x,%d)", NULL, NULL },
95
-{ TARGET_OPENBSD_NR_mquery, "mquery", NULL, NULL, NULL },
96
-{ TARGET_OPENBSD_NR_msgctl, "msgctl", NULL, NULL, NULL },
97
-{ TARGET_OPENBSD_NR_msgget, "msgget", NULL, NULL, NULL },
98
-{ TARGET_OPENBSD_NR_msgrcv, "msgrcv", NULL, NULL, NULL },
99
-{ TARGET_OPENBSD_NR_msgsnd, "msgsnd", NULL, NULL, NULL },
100
-{ TARGET_OPENBSD_NR_msync, "msync", NULL, NULL, NULL },
101
-{ TARGET_OPENBSD_NR_munlock, "munlock", NULL, NULL, NULL },
102
-{ TARGET_OPENBSD_NR_munlockall, "munlockall", NULL, NULL, NULL },
103
-{ TARGET_OPENBSD_NR_munmap, "munmap", "%s(%p,%d)", NULL, NULL },
104
-{ TARGET_OPENBSD_NR_nanosleep, "nanosleep", NULL, NULL, NULL },
105
-{ TARGET_OPENBSD_NR_nfssvc, "nfssvc", NULL, NULL, NULL },
106
-{ TARGET_OPENBSD_NR_open, "open", "%s(\"%s\",%#x,%#o)", NULL, NULL },
107
-{ TARGET_OPENBSD_NR_opipe, "opipe", NULL, NULL, NULL },
108
-{ TARGET_OPENBSD_NR_osigaltstack, "osigaltstack", NULL, NULL, NULL },
109
-{ TARGET_OPENBSD_NR_pathconf, "pathconf", NULL, NULL, NULL },
110
-{ TARGET_OPENBSD_NR_pipe, "pipe", NULL, NULL, NULL },
111
-{ TARGET_OPENBSD_NR_poll, "poll", NULL, NULL, NULL },
112
-{ TARGET_OPENBSD_NR_pread, "pread", NULL, NULL, NULL },
113
-{ TARGET_OPENBSD_NR_preadv, "preadv", NULL, NULL, NULL },
114
-{ TARGET_OPENBSD_NR_profil, "profil", NULL, NULL, NULL },
115
-{ TARGET_OPENBSD_NR_ptrace, "ptrace", NULL, NULL, NULL },
116
-{ TARGET_OPENBSD_NR_pwrite, "pwrite", NULL, NULL, NULL },
117
-{ TARGET_OPENBSD_NR_pwritev, "pwritev", NULL, NULL, NULL },
118
-{ TARGET_OPENBSD_NR_quotactl, "quotactl", NULL, NULL, NULL },
119
-{ TARGET_OPENBSD_NR_read, "read", "%s(%d,%#x,%d)", NULL, NULL },
120
-{ TARGET_OPENBSD_NR_readlink, "readlink", "%s(\"%s\",%p,%d)", NULL, NULL },
121
-{ TARGET_OPENBSD_NR_readv, "readv", NULL, NULL, NULL },
122
-{ TARGET_OPENBSD_NR_reboot, "reboot", NULL, NULL, NULL },
123
-{ TARGET_OPENBSD_NR_recvfrom, "recvfrom", NULL, NULL, NULL },
124
-{ TARGET_OPENBSD_NR_recvmsg, "recvmsg", NULL, NULL, NULL },
125
-{ TARGET_OPENBSD_NR_rename, "rename", "%s(\"%s\",\"%s\")", NULL, NULL },
126
-{ TARGET_OPENBSD_NR_revoke, "revoke", NULL, NULL, NULL },
127
-{ TARGET_OPENBSD_NR_rfork, "rfork", NULL, NULL, NULL },
128
-{ TARGET_OPENBSD_NR_rmdir, "rmdir", NULL, NULL, NULL },
129
-{ TARGET_OPENBSD_NR_sbrk, "sbrk", NULL, NULL, NULL },
130
-{ TARGET_OPENBSD_NR_sched_yield, "sched_yield", NULL, NULL, NULL },
131
-{ TARGET_OPENBSD_NR_select, "select", NULL, NULL, NULL },
132
-{ TARGET_OPENBSD_NR_semget, "semget", NULL, NULL, NULL },
133
-{ TARGET_OPENBSD_NR_semop, "semop", NULL, NULL, NULL },
134
-{ TARGET_OPENBSD_NR_sendmsg, "sendmsg", NULL, NULL, NULL },
135
-{ TARGET_OPENBSD_NR_sendto, "sendto", NULL, NULL, NULL },
136
-{ TARGET_OPENBSD_NR_setegid, "setegid", NULL, NULL, NULL },
137
-{ TARGET_OPENBSD_NR_seteuid, "seteuid", NULL, NULL, NULL },
138
-{ TARGET_OPENBSD_NR_setgid, "setgid", NULL, NULL, NULL },
139
-{ TARGET_OPENBSD_NR_setgroups, "setgroups", NULL, NULL, NULL },
140
-{ TARGET_OPENBSD_NR_setitimer, "setitimer", NULL, NULL, NULL },
141
-{ TARGET_OPENBSD_NR_setlogin, "setlogin", NULL, NULL, NULL },
142
-{ TARGET_OPENBSD_NR_setpgid, "setpgid", NULL, NULL, NULL },
143
-{ TARGET_OPENBSD_NR_setpriority, "setpriority", NULL, NULL, NULL },
144
-{ TARGET_OPENBSD_NR_setregid, "setregid", NULL, NULL, NULL },
145
-{ TARGET_OPENBSD_NR_setresgid, "setresgid", NULL, NULL, NULL },
146
-{ TARGET_OPENBSD_NR_setresuid, "setresuid", NULL, NULL, NULL },
147
-{ TARGET_OPENBSD_NR_setreuid, "setreuid", NULL, NULL, NULL },
148
-{ TARGET_OPENBSD_NR_setrlimit, "setrlimit", NULL, NULL, NULL },
149
-{ TARGET_OPENBSD_NR_setsid, "setsid", NULL, NULL, NULL },
150
-{ TARGET_OPENBSD_NR_setsockopt, "setsockopt", NULL, NULL, NULL },
151
-{ TARGET_OPENBSD_NR_settimeofday, "settimeofday", NULL, NULL, NULL },
152
-{ TARGET_OPENBSD_NR_setuid, "setuid", NULL, NULL, NULL },
153
-{ TARGET_OPENBSD_NR_shmat, "shmat", NULL, NULL, NULL },
154
-{ TARGET_OPENBSD_NR_shmctl, "shmctl", NULL, NULL, NULL },
155
-{ TARGET_OPENBSD_NR_shmdt, "shmdt", NULL, NULL, NULL },
156
-{ TARGET_OPENBSD_NR_shmget, "shmget", NULL, NULL, NULL },
157
-{ TARGET_OPENBSD_NR_shutdown, "shutdown", NULL, NULL, NULL },
158
-{ TARGET_OPENBSD_NR_sigaction, "sigaction", NULL, NULL, NULL },
159
-{ TARGET_OPENBSD_NR_sigaltstack, "sigaltstack", "%s(%p,%p)", NULL, NULL },
160
-{ TARGET_OPENBSD_NR_sigpending, "sigpending", NULL, NULL, NULL },
161
-{ TARGET_OPENBSD_NR_sigprocmask, "sigprocmask", NULL, NULL, NULL },
162
-{ TARGET_OPENBSD_NR_sigreturn, "sigreturn", NULL, NULL, NULL },
163
-{ TARGET_OPENBSD_NR_sigsuspend, "sigsuspend", NULL, NULL, NULL },
164
-{ TARGET_OPENBSD_NR_socket, "socket", NULL, NULL, NULL },
165
-{ TARGET_OPENBSD_NR_socketpair, "socketpair", NULL, NULL, NULL },
166
-{ TARGET_OPENBSD_NR_sstk, "sstk", NULL, NULL, NULL },
167
-{ TARGET_OPENBSD_NR_stat, "stat", "%s(\"%s\",%p)", NULL, NULL },
168
-{ TARGET_OPENBSD_NR_statfs, "statfs", "%s(\"%s\",%p)", NULL, NULL },
169
-{ TARGET_OPENBSD_NR_swapctl, "swapctl", NULL, NULL, NULL },
170
-{ TARGET_OPENBSD_NR_symlink, "symlink", "%s(\"%s\",\"%s\")", NULL, NULL },
171
-{ TARGET_OPENBSD_NR_sync, "sync", NULL, NULL, NULL },
172
-{ TARGET_OPENBSD_NR_sysarch, "sysarch", NULL, NULL, NULL },
173
-{ TARGET_OPENBSD_NR_syscall, "syscall", NULL, NULL, NULL },
174
-{ TARGET_OPENBSD_NR_threxit, "threxit", NULL, NULL, NULL },
175
-{ TARGET_OPENBSD_NR_thrsigdivert, "thrsigdivert", NULL, NULL, NULL },
176
-{ TARGET_OPENBSD_NR_thrsleep, "thrsleep", NULL, NULL, NULL },
177
-{ TARGET_OPENBSD_NR_thrwakeup, "thrwakeup", NULL, NULL, NULL },
178
-{ TARGET_OPENBSD_NR_truncate, "truncate", NULL, NULL, NULL },
179
-{ TARGET_OPENBSD_NR_umask, "umask", "%s(%#o)", NULL, NULL },
180
-{ TARGET_OPENBSD_NR_unlink, "unlink", "%s(\"%s\")", NULL, NULL },
181
-{ TARGET_OPENBSD_NR_unmount, "unmount", NULL, NULL, NULL },
182
-{ TARGET_OPENBSD_NR_utimes, "utimes", NULL, NULL, NULL },
183
-{ TARGET_OPENBSD_NR_vfork, "vfork", NULL, NULL, NULL },
184
-{ TARGET_OPENBSD_NR_wait4, "wait4", NULL, NULL, NULL },
185
-{ TARGET_OPENBSD_NR_write, "write", "%s(%d,%#x,%d)", NULL, NULL },
186
-{ TARGET_OPENBSD_NR_writev, "writev", "%s(%d,%p,%#x)", NULL, NULL },
187
-{ TARGET_OPENBSD_NR_xfspioctl, "xfspioctl", NULL, NULL, NULL },
bsd-user/openbsd/syscall_nr.h
deleted
-225
@@ -1,225 +0,0 @@
1
-/* $OpenBSD: syscall.h,v 1.101 2008/03/16 19:43:41 otto Exp $ */
2
-
3
-/*
4
- * System call numbers.
5
- *
6
- * created from; OpenBSD: syscalls.master,v 1.90 2008/03/16 19:42:57 otto Exp
7
- */
8
-
9
-#define TARGET_OPENBSD_NR_syscall 0
10
-#define TARGET_OPENBSD_NR_exit 1
11
-#define TARGET_OPENBSD_NR_fork 2
12
-#define TARGET_OPENBSD_NR_read 3
13
-#define TARGET_OPENBSD_NR_write 4
14
-#define TARGET_OPENBSD_NR_open 5
15
-#define TARGET_OPENBSD_NR_close 6
16
-#define TARGET_OPENBSD_NR_wait4 7
17
-#define TARGET_OPENBSD_NR_link 9
18
-#define TARGET_OPENBSD_NR_unlink 10
19
-#define TARGET_OPENBSD_NR_chdir 12
20
-#define TARGET_OPENBSD_NR_fchdir 13
21
-#define TARGET_OPENBSD_NR_mknod 14
22
-#define TARGET_OPENBSD_NR_chmod 15
23
-#define TARGET_OPENBSD_NR_chown 16
24
-#define TARGET_OPENBSD_NR_break 17
25
-#define TARGET_OPENBSD_NR_getpid 20
26
-#define TARGET_OPENBSD_NR_mount 21
27
-#define TARGET_OPENBSD_NR_unmount 22
28
-#define TARGET_OPENBSD_NR_setuid 23
29
-#define TARGET_OPENBSD_NR_getuid 24
30
-#define TARGET_OPENBSD_NR_geteuid 25
31
-#define TARGET_OPENBSD_NR_ptrace 26
32
-#define TARGET_OPENBSD_NR_recvmsg 27
33
-#define TARGET_OPENBSD_NR_sendmsg 28
34
-#define TARGET_OPENBSD_NR_recvfrom 29
35
-#define TARGET_OPENBSD_NR_accept 30
36
-#define TARGET_OPENBSD_NR_getpeername 31
37
-#define TARGET_OPENBSD_NR_getsockname 32
38
-#define TARGET_OPENBSD_NR_access 33
39
-#define TARGET_OPENBSD_NR_chflags 34
40
-#define TARGET_OPENBSD_NR_fchflags 35
41
-#define TARGET_OPENBSD_NR_sync 36
42
-#define TARGET_OPENBSD_NR_kill 37
43
-#define TARGET_OPENBSD_NR_getppid 39
44
-#define TARGET_OPENBSD_NR_dup 41
45
-#define TARGET_OPENBSD_NR_opipe 42
46
-#define TARGET_OPENBSD_NR_getegid 43
47
-#define TARGET_OPENBSD_NR_profil 44
48
-#define TARGET_OPENBSD_NR_ktrace 45
49
-#define TARGET_OPENBSD_NR_sigaction 46
50
-#define TARGET_OPENBSD_NR_getgid 47
51
-#define TARGET_OPENBSD_NR_sigprocmask 48
52
-#define TARGET_OPENBSD_NR_getlogin 49
53
-#define TARGET_OPENBSD_NR_setlogin 50
54
-#define TARGET_OPENBSD_NR_acct 51
55
-#define TARGET_OPENBSD_NR_sigpending 52
56
-#define TARGET_OPENBSD_NR_osigaltstack 53
57
-#define TARGET_OPENBSD_NR_ioctl 54
58
-#define TARGET_OPENBSD_NR_reboot 55
59
-#define TARGET_OPENBSD_NR_revoke 56
60
-#define TARGET_OPENBSD_NR_symlink 57
61
-#define TARGET_OPENBSD_NR_readlink 58
62
-#define TARGET_OPENBSD_NR_execve 59
63
-#define TARGET_OPENBSD_NR_umask 60
64
-#define TARGET_OPENBSD_NR_chroot 61
65
-#define TARGET_OPENBSD_NR_vfork 66
66
-#define TARGET_OPENBSD_NR_sbrk 69
67
-#define TARGET_OPENBSD_NR_sstk 70
68
-#define TARGET_OPENBSD_NR_munmap 73
69
-#define TARGET_OPENBSD_NR_mprotect 74
70
-#define TARGET_OPENBSD_NR_madvise 75
71
-#define TARGET_OPENBSD_NR_mincore 78
72
-#define TARGET_OPENBSD_NR_getgroups 79
73
-#define TARGET_OPENBSD_NR_setgroups 80
74
-#define TARGET_OPENBSD_NR_getpgrp 81
75
-#define TARGET_OPENBSD_NR_setpgid 82
76
-#define TARGET_OPENBSD_NR_setitimer 83
77
-#define TARGET_OPENBSD_NR_getitimer 86
78
-#define TARGET_OPENBSD_NR_dup2 90
79
-#define TARGET_OPENBSD_NR_fcntl 92
80
-#define TARGET_OPENBSD_NR_select 93
81
-#define TARGET_OPENBSD_NR_fsync 95
82
-#define TARGET_OPENBSD_NR_setpriority 96
83
-#define TARGET_OPENBSD_NR_socket 97
84
-#define TARGET_OPENBSD_NR_connect 98
85
-#define TARGET_OPENBSD_NR_getpriority 100
86
-#define TARGET_OPENBSD_NR_sigreturn 103
87
-#define TARGET_OPENBSD_NR_bind 104
88
-#define TARGET_OPENBSD_NR_setsockopt 105
89
-#define TARGET_OPENBSD_NR_listen 106
90
-#define TARGET_OPENBSD_NR_sigsuspend 111
91
-#define TARGET_OPENBSD_NR_gettimeofday 116
92
-#define TARGET_OPENBSD_NR_getrusage 117
93
-#define TARGET_OPENBSD_NR_getsockopt 118
94
-#define TARGET_OPENBSD_NR_readv 120
95
-#define TARGET_OPENBSD_NR_writev 121
96
-#define TARGET_OPENBSD_NR_settimeofday 122
97
-#define TARGET_OPENBSD_NR_fchown 123
98
-#define TARGET_OPENBSD_NR_fchmod 124
99
-#define TARGET_OPENBSD_NR_setreuid 126
100
-#define TARGET_OPENBSD_NR_setregid 127
101
-#define TARGET_OPENBSD_NR_rename 128
102
-#define TARGET_OPENBSD_NR_flock 131
103
-#define TARGET_OPENBSD_NR_mkfifo 132
104
-#define TARGET_OPENBSD_NR_sendto 133
105
-#define TARGET_OPENBSD_NR_shutdown 134
106
-#define TARGET_OPENBSD_NR_socketpair 135
107
-#define TARGET_OPENBSD_NR_mkdir 136
108
-#define TARGET_OPENBSD_NR_rmdir 137
109
-#define TARGET_OPENBSD_NR_utimes 138
110
-#define TARGET_OPENBSD_NR_adjtime 140
111
-#define TARGET_OPENBSD_NR_setsid 147
112
-#define TARGET_OPENBSD_NR_quotactl 148
113
-#define TARGET_OPENBSD_NR_nfssvc 155
114
-#define TARGET_OPENBSD_NR_getfh 161
115
-#define TARGET_OPENBSD_NR_sysarch 165
116
-#define TARGET_OPENBSD_NR_pread 173
117
-#define TARGET_OPENBSD_NR_pwrite 174
118
-#define TARGET_OPENBSD_NR_setgid 181
119
-#define TARGET_OPENBSD_NR_setegid 182
120
-#define TARGET_OPENBSD_NR_seteuid 183
121
-#define TARGET_OPENBSD_NR_lfs_bmapv 184
122
-#define TARGET_OPENBSD_NR_lfs_markv 185
123
-#define TARGET_OPENBSD_NR_lfs_segclean 186
124
-#define TARGET_OPENBSD_NR_lfs_segwait 187
125
-#define TARGET_OPENBSD_NR_pathconf 191
126
-#define TARGET_OPENBSD_NR_fpathconf 192
127
-#define TARGET_OPENBSD_NR_swapctl 193
128
-#define TARGET_OPENBSD_NR_getrlimit 194
129
-#define TARGET_OPENBSD_NR_setrlimit 195
130
-#define TARGET_OPENBSD_NR_getdirentries 196
131
-#define TARGET_OPENBSD_NR_mmap 197
132
-#define TARGET_OPENBSD_NR___syscall 198
133
-#define TARGET_OPENBSD_NR_lseek 199
134
-#define TARGET_OPENBSD_NR_truncate 200
135
-#define TARGET_OPENBSD_NR_ftruncate 201
136
-#define TARGET_OPENBSD_NR___sysctl 202
137
-#define TARGET_OPENBSD_NR_mlock 203
138
-#define TARGET_OPENBSD_NR_munlock 204
139
-#define TARGET_OPENBSD_NR_futimes 206
140
-#define TARGET_OPENBSD_NR_getpgid 207
141
-#define TARGET_OPENBSD_NR_xfspioctl 208
142
-#define TARGET_OPENBSD_NR_semget 221
143
-#define TARGET_OPENBSD_NR_msgget 225
144
-#define TARGET_OPENBSD_NR_msgsnd 226
145
-#define TARGET_OPENBSD_NR_msgrcv 227
146
-#define TARGET_OPENBSD_NR_shmat 228
147
-#define TARGET_OPENBSD_NR_shmdt 230
148
-#define TARGET_OPENBSD_NR_clock_gettime 232
149
-#define TARGET_OPENBSD_NR_clock_settime 233
150
-#define TARGET_OPENBSD_NR_clock_getres 234
151
-#define TARGET_OPENBSD_NR_nanosleep 240
152
-#define TARGET_OPENBSD_NR_minherit 250
153
-#define TARGET_OPENBSD_NR_rfork 251
154
-#define TARGET_OPENBSD_NR_poll 252
155
-#define TARGET_OPENBSD_NR_issetugid 253
156
-#define TARGET_OPENBSD_NR_lchown 254
157
-#define TARGET_OPENBSD_NR_getsid 255
158
-#define TARGET_OPENBSD_NR_msync 256
159
-#define TARGET_OPENBSD_NR_pipe 263
160
-#define TARGET_OPENBSD_NR_fhopen 264
161
-#define TARGET_OPENBSD_NR_preadv 267
162
-#define TARGET_OPENBSD_NR_pwritev 268
163
-#define TARGET_OPENBSD_NR_kqueue 269
164
-#define TARGET_OPENBSD_NR_kevent 270
165
-#define TARGET_OPENBSD_NR_mlockall 271
166
-#define TARGET_OPENBSD_NR_munlockall 272
167
-#define TARGET_OPENBSD_NR_getpeereid 273
168
-#define TARGET_OPENBSD_NR_getresuid 281
169
-#define TARGET_OPENBSD_NR_setresuid 282
170
-#define TARGET_OPENBSD_NR_getresgid 283
171
-#define TARGET_OPENBSD_NR_setresgid 284
172
-#define TARGET_OPENBSD_NR_mquery 286
173
-#define TARGET_OPENBSD_NR_closefrom 287
174
-#define TARGET_OPENBSD_NR_sigaltstack 288
175
-#define TARGET_OPENBSD_NR_shmget 289
176
-#define TARGET_OPENBSD_NR_semop 290
177
-#define TARGET_OPENBSD_NR_stat 291
178
-#define TARGET_OPENBSD_NR_fstat 292
179
-#define TARGET_OPENBSD_NR_lstat 293
180
-#define TARGET_OPENBSD_NR_fhstat 294
181
-#define TARGET_OPENBSD_NR___semctl 295
182
-#define TARGET_OPENBSD_NR_shmctl 296
183
-#define TARGET_OPENBSD_NR_msgctl 297
184
-#define TARGET_OPENBSD_NR_sched_yield 298
185
-#define TARGET_OPENBSD_NR_getthrid 299
186
-#define TARGET_OPENBSD_NR_thrsleep 300
187
-#define TARGET_OPENBSD_NR_thrwakeup 301
188
-#define TARGET_OPENBSD_NR_threxit 302
189
-#define TARGET_OPENBSD_NR_thrsigdivert 303
190
-#define TARGET_OPENBSD_NR___getcwd 304
191
-#define TARGET_OPENBSD_NR_adjfreq 305
192
-#define TARGET_OPENBSD_NR_getfsstat 306
193
-#define TARGET_OPENBSD_NR_statfs 307
194
-#define TARGET_OPENBSD_NR_fstatfs 308
195
-#define TARGET_OPENBSD_NR_fhstatfs 309
196
-
197
-/* syscall flags from machine/trap.h */
198
-
199
-/* $OpenBSD: trap.h,v 1.4 2008/07/04 22:04:37 kettenis Exp $ */
200
-/* $NetBSD: trap.h,v 1.4 1999/06/07 05:28:04 eeh Exp $ */
201
-
202
-/*
203
- * Copyright (c) 1996-1999 Eduardo Horvath
204
- *
205
- * Redistribution and use in source and binary forms, with or without
206
- * modification, are permitted provided that the following conditions
207
- * are met:
208
- * 1. Redistributions of source code must retain the above copyright
209
- * notice, this list of conditions and the following disclaimer.
210
- *
211
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
212
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
213
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
214
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
215
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
216
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
217
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
218
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
219
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
220
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
221
- * SUCH DAMAGE.
222
- *
223
- */
224
-#define TARGET_OPENBSD_SYSCALL_G2RFLAG 0x400 /* on success, return to %g2 rather than npc */
225
-#define TARGET_OPENBSD_SYSCALL_G7RFLAG 0x800 /* use %g7 as above (deprecated) */
bsd-user/openbsd/target_os_elf.h
deleted
-148
@@ -1,148 +0,0 @@
1
-/*
2
- * openbsd 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
- * OpenBSD 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/openbsd/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/openbsd/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<OSTOP) */
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/openbsd/target_os_stack.h
deleted
-56
@@ -1,56 +0,0 @@
1
-/*
2
- * OpenBSD 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/openbsd/target_os_thread.h
deleted
-25
@@ -1,25 +0,0 @@
1
-/*
2
- * OpenBSD 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
@@ -182,9 +182,6 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
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);
185
-abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
186
- abi_long arg2, abi_long arg3, abi_long arg4,
187
- abi_long arg5, abi_long arg6);
185
void gemu_log(const char *fmt, ...) G_GNUC_PRINTF(1, 2);
186
extern __thread CPUState *thread_cpu;
187
char *target_strerror(int err);
@@ -215,11 +212,6 @@ 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);
218
-void
219
-print_openbsd_syscall(int num,
220
- abi_long arg1, abi_long arg2, abi_long arg3,
221
- abi_long arg4, abi_long arg5, abi_long arg6);
222
-void print_openbsd_syscall_ret(int num, abi_long ret);
215
/**
216
* print_taken_signal:
217
* @target_signum: target signal being taken
bsd-user/strace.c
-17
@@ -156,9 +156,6 @@ static const struct syscallname freebsd_scnames[] = {
156
static const struct syscallname netbsd_scnames[] = {
157
#include "netbsd/strace.list"
158
};
159
-static const struct syscallname openbsd_scnames[] = {
160
-#include "openbsd/strace.list"
161
-};
159
160
static void print_syscall(int num, const struct syscallname *scnames,
161
unsigned int nscnames, abi_long arg1, abi_long arg2, abi_long arg3,
@@ -244,20 +241,6 @@ void print_netbsd_syscall_ret(int num, abi_long ret)
241
print_syscall_ret(num, ret, netbsd_scnames, ARRAY_SIZE(netbsd_scnames));
242
}
243
247
-void print_openbsd_syscall(int num, abi_long arg1, abi_long arg2, abi_long arg3,
248
- abi_long arg4, abi_long arg5, abi_long arg6)
249
-{
250
-
251
- print_syscall(num, openbsd_scnames, ARRAY_SIZE(openbsd_scnames), arg1, arg2,
252
- arg3, arg4, arg5, arg6);
253
-}
254
-
255
-void print_openbsd_syscall_ret(int num, abi_long ret)
256
-{
257
-
258
- print_syscall_ret(num, ret, openbsd_scnames, ARRAY_SIZE(openbsd_scnames));
259
-}
260
-
244
static void
245
print_signal(abi_ulong arg, int last)
246
{
bsd-user/syscall_defs.h
-10
@@ -27,7 +27,6 @@
27
28
#include "freebsd/syscall_nr.h"
29
#include "netbsd/syscall_nr.h"
30
-#include "openbsd/syscall_nr.h"
30
31
/*
32
* machine/_types.h
@@ -120,15 +119,6 @@ struct bsd_shm_regions {
119
120
#define TARGET_NETBSD_MAP_FLAGMASK 0x3ff7
121
123
-#define TARGET_OPENBSD_MAP_INHERIT 0x0080 /* region is retained after */
124
- /* exec */
125
-#define TARGET_OPENBSD_MAP_NOEXTEND 0x0100 /* for MAP_FILE, don't change */
126
- /* file size */
127
-#define TARGET_OPENBSD_MAP_TRYFIXED 0x0400 /* attempt hint address, */
128
- /* even within heap */
129
-
130
-#define TARGET_OPENBSD_MAP_FLAGMASK 0x17f7
131
-
122
/* XXX */
123
#define TARGET_BSD_MAP_FLAGMASK 0x3ff7
124