According to the handbook and loader(8) man page, we should be able to to things
like this:
unload load kernel.old
and
load kernel load splash_bmp load -t splash_image_data /boot/chuckrulez.bmp autoboot 5
However, this is what happens (tested in 13-CURRENT on VM and ZFS and on 12.1 physical machine wiht UFS)
In the first case:
OK unload OK load kernel.old can't find 'kernel.old'
In the second case:
OK load kernel.old can't find 'kernel.old' OK load splash_bmp can't find 'splash_bmp'
loader(8) man page states the following:
module_path Sets the list of directories which will be searched for modules named in a load command or implicitly required by a dependency. The default value for this variable is "/boot/kernel;/boot/modules".
But loader(8) looks for files as follows:
if module_path is empty, default_searchpath (stand/common/modules.c) becomes
/boot/kernel;/boot/modules and maybe something more in addition (depending on
the case). However, because loader(8) reads /boot/defaults/loader.rc it
never applies the default since in that file we set the variable like this:
module_path="/boot/modules;/boot/dtb;/boot/dtb/overlays
Notice that we don't include /boot/kernel and hence we can not load kernels
or modules (the ones that come with the kernel by default) using non fully
qualified paths.