opnsense-src/stand/common
Kyle Evans 2b31059ea7 loader: fix elf lookup_symbol type filtering
The existing logic doesn't seem to make much sense, as we won't filter
on the type if st_shndx != SHN_UNDEF.  In practice, this breaks booting
12.3 kernels on newer loaders, as they do have a `kernphys` symbol of
the wrong type (NOTYPE, rather than OBJECT) -- we end up deriving the
wrong value for copy_staging.

It's unclear if this version makes any more sense, but it seems to match
what rtld's matched_symbol() does.  Loader doesn't need to care about
STT_FUNC w/ UND shndx, because we won't encounter those; in kmods,
undefined (kernel) functions are NOTYPE.

Reported by:	Christian McDonald <cmcdonald netgate com>
Reviewed by:	imp, kib, tsoome

(cherry picked from commit 0701dbda94)
2022-10-17 10:40:41 -05:00
..
bcache.c loader: bcache: Fix debug printf 2022-01-13 08:58:46 +01:00
boot.c stand: Remove a double word in a source code comment 2022-04-14 08:07:55 +02:00
bootstrap.h loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
commands.c stand: Don't build readtest command on mips 2022-01-13 14:38:24 +01:00
console.c loader: Set twiddle globaldiv to 16 by default 2021-12-29 14:53:19 -08:00
dev_net.c loader: dev_net.c should use __func__ with printf 2021-10-01 09:55:18 +03:00
dev_net.h
devopen.c loader: clean up devopen and devclose a bit 2019-12-13 08:41:37 +00:00
disk.c loader: disk_open() should honor D_PARTNONE 2019-06-06 16:27:05 +00:00
disk.h Distinguish between "no partition" and "choose best partition" with a constant. 2019-03-24 18:51:52 +00:00
gfx_fb.c efi: switch boot_services_gone to boot_services_active 2022-06-26 07:58:55 +03:00
gfx_fb.h loader.efi: to preserve heap space, use AllocatePages() for shadow_fb 2022-01-10 12:28:30 +02:00
help.common loader: implement map-vdisk and unmap-vdisk commands 2019-04-26 17:58:44 +00:00
install.c Fix compilation error for install.c in loader 2020-07-31 16:08:25 +00:00
interp.c MFC loader+userland TSLOG support 2021-12-29 14:53:18 -08:00
interp_backslash.c
interp_forth.c veloader use vectx API for kernel and modules 2020-03-08 17:42:42 +00:00
interp_lua.c MFC loader+userland TSLOG support 2021-12-29 14:53:18 -08:00
interp_parse.c
interp_simple.c veloader use vectx API for kernel and modules 2020-03-08 17:42:42 +00:00
isapnp.c stand: Fix a common typo in source code comments 2022-06-10 14:23:25 +02:00
isapnp.h
load_elf.c loader: fix elf lookup_symbol type filtering 2022-10-17 10:40:41 -05:00
load_elf32.c
load_elf32_obj.c
load_elf64.c
load_elf64_obj.c
load_elf_obj.c loader: Don't reserve space for symbols twice. 2021-07-16 12:28:45 -06:00
ls.c
Makefile.depend
md.c
merge_help.awk
metadata.c Remove sparc64 support from the boot loader. 2020-02-03 17:34:57 +00:00
misc.c loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
module.c loader: tslog: Add more log for module loading 2022-01-27 11:06:43 +01:00
newvers.sh Fix stand/newvers.sh with zsh in sh mode 2020-08-12 15:49:10 +00:00
nvstore.c loader: zfs should support bootonce an nextboot 2020-09-21 09:01:10 +00:00
part.c loader: variable i is unused without MBR/GPT support built in 2020-06-16 07:05:03 +00:00
part.h loader: show APFS partition type name 2019-11-04 12:20:19 +00:00
paths.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
pnp.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
rbx.h
readin.h veloader use vectx API for kernel and modules 2020-03-08 18:48:01 +00:00
reloc_elf.c Reuse the amd64 loader relocation code on arm64 2021-01-20 17:59:38 +00:00
reloc_elf32.c
reloc_elf64.c
self_reloc.c RISC-V boot1.efi and loader.efi support 2020-07-06 18:19:42 +00:00
tslog.c MFC loader+userland TSLOG support 2021-12-29 14:53:18 -08:00
vdisk.c loader: vdisk dereference after free 2019-12-13 08:20:20 +00:00
zfs_cmd.c loader: zfs_cmd.c does not really compile without libzfs.h 2020-06-16 07:30:34 +00:00