Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/mips/freebsd32_machdep.c
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
#include <machine/sigframe.h> | #include <machine/sigframe.h> | ||||
#include <machine/sysarch.h> | #include <machine/sysarch.h> | ||||
#include <machine/tls.h> | #include <machine/tls.h> | ||||
#include <compat/freebsd32/freebsd32_signal.h> | #include <compat/freebsd32/freebsd32_signal.h> | ||||
#include <compat/freebsd32/freebsd32_util.h> | #include <compat/freebsd32/freebsd32_util.h> | ||||
#include <compat/freebsd32/freebsd32_proto.h> | #include <compat/freebsd32/freebsd32_proto.h> | ||||
static void freebsd32_exec_setregs(struct thread *, struct image_params *, u_long); | static void freebsd32_exec_setregs(struct thread *, struct image_params *, | ||||
uintptr_t); | |||||
static int get_mcontext32(struct thread *, mcontext32_t *, int); | static int get_mcontext32(struct thread *, mcontext32_t *, int); | ||||
static int set_mcontext32(struct thread *, mcontext32_t *); | static int set_mcontext32(struct thread *, mcontext32_t *); | ||||
static void freebsd32_sendsig(sig_t, ksiginfo_t *, sigset_t *); | static void freebsd32_sendsig(sig_t, ksiginfo_t *, sigset_t *); | ||||
extern const char *freebsd32_syscallnames[]; | extern const char *freebsd32_syscallnames[]; | ||||
struct sysentvec elf32_freebsd_sysvec = { | struct sysentvec elf32_freebsd_sysvec = { | ||||
.sv_size = SYS_MAXSYSCALL, | .sv_size = SYS_MAXSYSCALL, | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | static Elf32_Brandinfo freebsd_brand_info = { | ||||
.flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE | ||||
}; | }; | ||||
SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, | SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, | ||||
(sysinit_cfunc_t) elf32_insert_brand_entry, | (sysinit_cfunc_t) elf32_insert_brand_entry, | ||||
&freebsd_brand_info); | &freebsd_brand_info); | ||||
static void | static void | ||||
freebsd32_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) | freebsd32_exec_setregs(struct thread *td, struct image_params *imgp, | ||||
uintptr_t stack) | |||||
{ | { | ||||
exec_setregs(td, imgp, stack); | exec_setregs(td, imgp, stack); | ||||
/* | /* | ||||
* See comment in exec_setregs about running 32-bit binaries with 64-bit | * See comment in exec_setregs about running 32-bit binaries with 64-bit | ||||
* registers. | * registers. | ||||
*/ | */ | ||||
td->td_frame->sp -= 65536; | td->td_frame->sp -= 65536; | ||||
▲ Show 20 Lines • Show All 358 Lines • Show Last 20 Lines |