Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/imgact_aout.c
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
#include <compat/freebsd32/freebsd32_proto.h> | #include <compat/freebsd32/freebsd32_proto.h> | ||||
#include <compat/freebsd32/freebsd32_syscall.h> | #include <compat/freebsd32/freebsd32_syscall.h> | ||||
#include <compat/ia32/ia32_signal.h> | #include <compat/ia32/ia32_signal.h> | ||||
#endif | #endif | ||||
static int exec_aout_imgact(struct image_params *imgp); | static int exec_aout_imgact(struct image_params *imgp); | ||||
static int aout_fixup(register_t **stack_base, struct image_params *imgp); | static int aout_fixup(register_t **stack_base, struct image_params *imgp); | ||||
#define AOUT32_USRSTACK 0xbfc00000 | |||||
#if defined(__i386__) | #if defined(__i386__) | ||||
#define AOUT32_PS_STRINGS (AOUT32_USRSTACK - sizeof(struct ps_strings)) | |||||
struct sysentvec aout_sysvec = { | struct sysentvec aout_sysvec = { | ||||
.sv_size = SYS_MAXSYSCALL, | .sv_size = SYS_MAXSYSCALL, | ||||
.sv_table = sysent, | .sv_table = sysent, | ||||
.sv_mask = 0, | .sv_mask = 0, | ||||
.sv_errsize = 0, | .sv_errsize = 0, | ||||
.sv_errtbl = NULL, | .sv_errtbl = NULL, | ||||
.sv_transtrap = NULL, | .sv_transtrap = NULL, | ||||
.sv_fixup = aout_fixup, | .sv_fixup = aout_fixup, | ||||
.sv_sendsig = sendsig, | .sv_sendsig = sendsig, | ||||
.sv_sigcode = sigcode, | .sv_sigcode = sigcode, | ||||
.sv_szsigcode = &szsigcode, | .sv_szsigcode = &szsigcode, | ||||
.sv_name = "FreeBSD a.out", | .sv_name = "FreeBSD a.out", | ||||
.sv_coredump = NULL, | .sv_coredump = NULL, | ||||
.sv_imgact_try = NULL, | .sv_imgact_try = NULL, | ||||
.sv_minsigstksz = MINSIGSTKSZ, | .sv_minsigstksz = MINSIGSTKSZ, | ||||
.sv_pagesize = PAGE_SIZE, | .sv_pagesize = PAGE_SIZE, | ||||
.sv_minuser = VM_MIN_ADDRESS, | .sv_minuser = VM_MIN_ADDRESS, | ||||
.sv_maxuser = VM_MAXUSER_ADDRESS, | .sv_maxuser = AOUT32_USRSTACK, | ||||
.sv_usrstack = USRSTACK, | .sv_usrstack = AOUT32_USRSTACK, | ||||
.sv_psstrings = PS_STRINGS, | .sv_psstrings = AOUT32_PS_STRINGS, | ||||
.sv_stackprot = VM_PROT_ALL, | .sv_stackprot = VM_PROT_ALL, | ||||
.sv_copyout_strings = exec_copyout_strings, | .sv_copyout_strings = exec_copyout_strings, | ||||
.sv_setregs = exec_setregs, | .sv_setregs = exec_setregs, | ||||
.sv_fixlimit = NULL, | .sv_fixlimit = NULL, | ||||
.sv_maxssiz = NULL, | .sv_maxssiz = NULL, | ||||
.sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32, | .sv_flags = SV_ABI_FREEBSD | SV_AOUT | SV_IA32 | SV_ILP32, | ||||
.sv_set_syscall_retval = cpu_set_syscall_retval, | .sv_set_syscall_retval = cpu_set_syscall_retval, | ||||
.sv_fetch_syscall_args = cpu_fetch_syscall_args, | .sv_fetch_syscall_args = cpu_fetch_syscall_args, | ||||
.sv_syscallnames = syscallnames, | .sv_syscallnames = syscallnames, | ||||
.sv_schedtail = NULL, | .sv_schedtail = NULL, | ||||
.sv_thread_detach = NULL, | .sv_thread_detach = NULL, | ||||
.sv_trap = NULL, | .sv_trap = NULL, | ||||
}; | }; | ||||
#elif defined(__amd64__) | #elif defined(__amd64__) | ||||
#define AOUT32_USRSTACK 0xbfc00000 | |||||
#define AOUT32_PS_STRINGS \ | #define AOUT32_PS_STRINGS \ | ||||
(AOUT32_USRSTACK - sizeof(struct freebsd32_ps_strings)) | (AOUT32_USRSTACK - sizeof(struct freebsd32_ps_strings)) | ||||
#define AOUT32_MINUSER FREEBSD32_MINUSER | #define AOUT32_MINUSER FREEBSD32_MINUSER | ||||
extern const char *freebsd32_syscallnames[]; | extern const char *freebsd32_syscallnames[]; | ||||
extern u_long ia32_maxssiz; | extern u_long ia32_maxssiz; | ||||
struct sysentvec aout_sysvec = { | struct sysentvec aout_sysvec = { | ||||
.sv_size = FREEBSD32_SYS_MAXSYSCALL, | .sv_size = FREEBSD32_SYS_MAXSYSCALL, | ||||
.sv_table = freebsd32_sysent, | .sv_table = freebsd32_sysent, | ||||
.sv_mask = 0, | .sv_mask = 0, | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |