d77ec799a5
static binary: otool). Dynamic binaires have a pointer to the Mach-O header on the top of the stack, static binaries don't have this, and having it produced a crash. One bugfix: the EXEC_MACHO code assumes that entry = NULL means that the entry point has not been found in the load commands seen so far. Therefore we need to initialized entry to NULL if we want a static binary to discover it. (dynamic binaries were forced to iscover it because when the intepreter load command is found, entry is updated whatever its value was before). One hack: Both COMPAT_MACH and COMPAT_DARWIN are willing to run Mach-O binaries. COMPAT_MACH fails for dynamic binaries because it cannot find the interpreter in /emul/mach. For static binaires, it will accept them (and for Darwin static binaries, this will cause a failure). Until we rite a test for matchinf Darwin static binaries, just swap the order of COMPAT_MACH and COMPAT_DARWIN in the exec switch so that COMPAT_DARWIN is tried first (this will have the advantage of speeding up program startup). EXECSW_PRIO_{FIRST_LAST} does not seem to work... |
||
---|---|---|
.. | ||
darwin_exec.c | ||
darwin_exec.h | ||
darwin_ioctl.c | ||
darwin_ioctl.h | ||
darwin_ioframebuffer.c | ||
darwin_ioframebuffer.h | ||
darwin_iohidsystem.c | ||
darwin_iohidsystem.h | ||
darwin_iokit.c | ||
darwin_iokit.h | ||
darwin_mman.c | ||
darwin_mount.c | ||
darwin_mount.h | ||
darwin_proc.h | ||
darwin_signal.c | ||
darwin_signal.h | ||
darwin_stat.c | ||
darwin_syscall.h | ||
darwin_syscallargs.h | ||
darwin_syscalls.c | ||
darwin_sysctl.c | ||
darwin_sysctl.h | ||
darwin_sysent.c | ||
darwin_thread.c | ||
darwin_types.h | ||
darwin_unistd.c | ||
files.darwin | ||
Makefile | ||
syscalls.conf | ||
syscalls.master |