MCPcopy Create free account
hub / github.com/F-Stack/f-stack / linux_exec_setregs

Function linux_exec_setregs

freebsd/i386/linux/linux_sysvec.c:807–820  ·  view source on GitHub ↗

* exec_setregs may initialize some registers differently than Linux * does, thus potentially confusing Linux binaries. If necessary, we * override the exec_setregs default(s) here. */

Source from the content-addressed store, hash-verified

805 * override the exec_setregs default(s) here.
806 */
807static void
808linux_exec_setregs(struct thread *td, struct image_params *imgp,
809 uintptr_t stack)
810{
811 struct pcb *pcb = td->td_pcb;
812
813 exec_setregs(td, imgp, stack);
814
815 /* Linux sets %gs to 0, we default to _udatasel. */
816 pcb->pcb_gs = 0;
817 load_gs(0);
818
819 pcb->pcb_initial_npxcw = __LINUX_NPXCW__;
820}
821
822static void
823linux_get_machine(const char **dst)

Callers

nothing calls this directly

Calls 2

exec_setregsFunction · 0.50
load_gsFunction · 0.50

Tested by

no test coverage detected