]> git.lizzy.rs Git - plan9front.git/commit
kernel: use 64-bit virtual entry point for expanded header, document behaviour in...
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sat, 29 May 2021 12:18:35 +0000 (14:18 +0200)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sat, 29 May 2021 12:18:35 +0000 (14:18 +0200)
commitc2297ce5c180e98f2217a691a25d19a300956d9f
tree0ed1ffd50a8618f2d3b8071370efe88d1b70904e
parentd168b89ab110a2d1fcaf72ad085a789092b82b00
kernel: use 64-bit virtual entry point for expanded header, document behaviour in a.out(6)

For 64-bit architectures, the a.out header has the HDR_MAGIC flag set
in the magic and is expanded by 8 bytes containing the 64-bit virtual
address of the programs entry point. While Exec.entry contains physical
address for kernel images.

Our sysexec() would always use Exec.entry, even for 64-bit a.out binaries,
which worked because PADDR(entry) == entry for userspace pointers.

This change fixes it, having the kernel use the 64-bit entry point
and document the behaviour in the manpage.
sys/man/6/a.out
sys/src/9/port/portfns.h
sys/src/9/port/rebootcmd.c
sys/src/9/port/sysproc.c