8f9635dc99
The Linux exports __kernel_sigreturn and __kernel_rt_sigreturn from the vdso. Modern glibc's sigaction sets the sa_restorer field of sigaction to the corresponding vdso __sigreturn, and sets the SA_RESTORER. Our signal trampolines uses the FreeBSD-way to call a signal handler, so does not use the sigaction's sa_restorer. However, as glibc's runtime linker depends on the existment of the vdso __sigreturn symbols, for all Linuxulators was added separate trampolines named __sigcode with DWARF anotations and left separate __sigreturn methods, which are exported. MFC after: 2 weeks
33 lines
1.3 KiB
C
33 lines
1.3 KiB
C
#include <sys/cdefs.h>
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
#include <sys/param.h>
|
|
#include <sys/assym.h>
|
|
#include <sys/systm.h>
|
|
|
|
#include <i386/linux/linux.h>
|
|
#include <compat/linux/linux_mib.h>
|
|
|
|
#include <x86/linux/linux_x86_sigframe.h>
|
|
|
|
ASSYM(LINUX_SIGF_SC, offsetof(struct l_sigframe, sf_sc));
|
|
ASSYM(LINUX_RT_SIGF_UC, offsetof(struct l_rt_sigframe, sf_uc));
|
|
ASSYM(LINUX_RT_SIGF_SC, offsetof(struct l_ucontext, uc_mcontext));
|
|
ASSYM(L_SC_GS, offsetof(struct l_sigcontext, sc_gs));
|
|
ASSYM(L_SC_FS, offsetof(struct l_sigcontext, sc_fs));
|
|
ASSYM(L_SC_ES, offsetof(struct l_sigcontext, sc_es));
|
|
ASSYM(L_SC_DS, offsetof(struct l_sigcontext, sc_ds));
|
|
ASSYM(L_SC_CS, offsetof(struct l_sigcontext, sc_cs));
|
|
ASSYM(L_SC_SS, offsetof(struct l_sigcontext, sc_ss));
|
|
ASSYM(L_SC_EFLAGS, offsetof(struct l_sigcontext, sc_eflags));
|
|
ASSYM(L_SC_EDI, offsetof(struct l_sigcontext, sc_edi));
|
|
ASSYM(L_SC_ESI, offsetof(struct l_sigcontext, sc_esi));
|
|
ASSYM(L_SC_EBP, offsetof(struct l_sigcontext, sc_ebp));
|
|
ASSYM(L_SC_EBX, offsetof(struct l_sigcontext, sc_ebx));
|
|
ASSYM(L_SC_EDX, offsetof(struct l_sigcontext, sc_edx));
|
|
ASSYM(L_SC_ECX, offsetof(struct l_sigcontext, sc_ecx));
|
|
ASSYM(L_SC_EAX, offsetof(struct l_sigcontext, sc_eax));
|
|
ASSYM(L_SC_EIP, offsetof(struct l_sigcontext, sc_eip));
|
|
ASSYM(L_SC_ESP, offsetof(struct l_sigcontext, sc_esp_at_signal));
|
|
ASSYM(LINUX_VERSION_CODE, LINUX_VERSION_CODE);
|