Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/elf_machdep.c
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/pmap.h> | #include <vm/pmap.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <machine/elf.h> | #include <machine/elf.h> | ||||
#include <machine/fpu.h> | #include <machine/fpu.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include "vdso_offsets.h" | |||||
extern const char _binary_elf_vdso_so_1_start[]; | |||||
extern const char _binary_elf_vdso_so_1_end[]; | |||||
extern char _binary_elf_vdso_so_1_size; | |||||
struct sysentvec elf64_freebsd_sysvec_la48 = { | struct sysentvec elf64_freebsd_sysvec_la48 = { | ||||
.sv_size = SYS_MAXSYSCALL, | .sv_size = SYS_MAXSYSCALL, | ||||
.sv_table = sysent, | .sv_table = sysent, | ||||
.sv_transtrap = NULL, | .sv_transtrap = NULL, | ||||
.sv_fixup = __elfN(freebsd_fixup), | .sv_fixup = __elfN(freebsd_fixup), | ||||
.sv_sendsig = sendsig, | .sv_sendsig = sendsig, | ||||
.sv_sigcode = sigcode, | .sv_sigcode = _binary_elf_vdso_so_1_start, | ||||
.sv_szsigcode = &szsigcode, | .sv_szsigcode = (int *)&_binary_elf_vdso_so_1_size, | ||||
.sv_sigcodeoff = VDSO_SIGCODE_OFFSET, | |||||
.sv_name = "FreeBSD ELF64", | .sv_name = "FreeBSD ELF64", | ||||
.sv_coredump = __elfN(coredump), | .sv_coredump = __elfN(coredump), | ||||
.sv_elf_core_osabi = ELFOSABI_FREEBSD, | .sv_elf_core_osabi = ELFOSABI_FREEBSD, | ||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, | .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, | ||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes), | .sv_elf_core_prepare_notes = __elfN(prepare_notes), | ||||
.sv_imgact_try = NULL, | .sv_imgact_try = NULL, | ||||
.sv_minsigstksz = MINSIGSTKSZ, | .sv_minsigstksz = MINSIGSTKSZ, | ||||
.sv_minuser = VM_MIN_ADDRESS, | .sv_minuser = VM_MIN_ADDRESS, | ||||
.sv_maxuser = VM_MAXUSER_ADDRESS_LA48, | .sv_maxuser = VM_MAXUSER_ADDRESS_LA48, | ||||
.sv_usrstack = USRSTACK_LA48, | .sv_usrstack = USRSTACK_LA48, | ||||
.sv_psstrings = PS_STRINGS_LA48, | .sv_psstrings = PS_STRINGS_LA48, | ||||
.sv_stackprot = VM_PROT_ALL, | .sv_stackprot = VM_PROT_ALL, | ||||
.sv_copyout_auxargs = __elfN(freebsd_copyout_auxargs), | .sv_copyout_auxargs = __elfN(freebsd_copyout_auxargs), | ||||
.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_ASLR | SV_LP64 | SV_SHP | | .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_LP64 | SV_SHP | | ||||
SV_TIMEKEEP | SV_RNG_SEED_VER, | SV_TIMEKEEP | SV_RNG_SEED_VER | SV_DSO_SIG, | ||||
.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_shared_page_base = SHAREDPAGE_LA48, | .sv_shared_page_base = SHAREDPAGE_LA48, | ||||
.sv_shared_page_len = PAGE_SIZE, | .sv_shared_page_len = PAGE_SIZE, | ||||
.sv_schedtail = NULL, | .sv_schedtail = NULL, | ||||
.sv_thread_detach = NULL, | .sv_thread_detach = NULL, | ||||
.sv_trap = NULL, | .sv_trap = NULL, | ||||
.sv_stackgap = elf64_stackgap, | .sv_stackgap = elf64_stackgap, | ||||
.sv_onexec_old = exec_onexec_old, | .sv_onexec_old = exec_onexec_old, | ||||
.sv_onexit = exit_onexit, | .sv_onexit = exit_onexit, | ||||
.sv_set_fork_retval = x86_set_fork_retval, | .sv_set_fork_retval = x86_set_fork_retval, | ||||
}; | }; | ||||
struct sysentvec elf64_freebsd_sysvec_la57 = { | struct sysentvec elf64_freebsd_sysvec_la57 = { | ||||
.sv_size = SYS_MAXSYSCALL, | .sv_size = SYS_MAXSYSCALL, | ||||
.sv_table = sysent, | .sv_table = sysent, | ||||
.sv_transtrap = NULL, | .sv_transtrap = NULL, | ||||
.sv_fixup = __elfN(freebsd_fixup), | .sv_fixup = __elfN(freebsd_fixup), | ||||
.sv_sendsig = sendsig, | .sv_sendsig = sendsig, | ||||
.sv_sigcode = sigcode, | .sv_sigcode = _binary_elf_vdso_so_1_start, | ||||
.sv_szsigcode = &szsigcode, | .sv_szsigcode = (int *)&_binary_elf_vdso_so_1_size, | ||||
.sv_sigcodeoff = VDSO_SIGCODE_OFFSET, | |||||
.sv_name = "FreeBSD ELF64", | .sv_name = "FreeBSD ELF64", | ||||
.sv_coredump = __elfN(coredump), | .sv_coredump = __elfN(coredump), | ||||
.sv_elf_core_osabi = ELFOSABI_FREEBSD, | .sv_elf_core_osabi = ELFOSABI_FREEBSD, | ||||
.sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, | .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, | ||||
.sv_elf_core_prepare_notes = __elfN(prepare_notes), | .sv_elf_core_prepare_notes = __elfN(prepare_notes), | ||||
.sv_imgact_try = NULL, | .sv_imgact_try = NULL, | ||||
.sv_minsigstksz = MINSIGSTKSZ, | .sv_minsigstksz = MINSIGSTKSZ, | ||||
.sv_minuser = VM_MIN_ADDRESS, | .sv_minuser = VM_MIN_ADDRESS, | ||||
.sv_maxuser = VM_MAXUSER_ADDRESS_LA57, | .sv_maxuser = VM_MAXUSER_ADDRESS_LA57, | ||||
.sv_usrstack = USRSTACK_LA57, | .sv_usrstack = USRSTACK_LA57, | ||||
.sv_psstrings = PS_STRINGS_LA57, | .sv_psstrings = PS_STRINGS_LA57, | ||||
.sv_stackprot = VM_PROT_ALL, | .sv_stackprot = VM_PROT_ALL, | ||||
.sv_copyout_auxargs = __elfN(freebsd_copyout_auxargs), | .sv_copyout_auxargs = __elfN(freebsd_copyout_auxargs), | ||||
.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_ASLR | SV_LP64 | SV_SHP | | .sv_flags = SV_ABI_FREEBSD | SV_ASLR | SV_LP64 | SV_SHP | | ||||
SV_TIMEKEEP | SV_RNG_SEED_VER, | SV_TIMEKEEP | SV_RNG_SEED_VER | SV_DSO_SIG, | ||||
.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_shared_page_base = SHAREDPAGE_LA57, | .sv_shared_page_base = SHAREDPAGE_LA57, | ||||
.sv_shared_page_len = PAGE_SIZE, | .sv_shared_page_len = PAGE_SIZE, | ||||
.sv_schedtail = NULL, | .sv_schedtail = NULL, | ||||
.sv_thread_detach = NULL, | .sv_thread_detach = NULL, | ||||
.sv_trap = NULL, | .sv_trap = NULL, | ||||
▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines |