Date: Mon, 23 Aug 2021 23:22:27 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 25a4a79ccca0 - stable/13 - loader: fix multiboot loading on UEFI Message-ID: <202108232322.17NNMRmh094756@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=25a4a79ccca09a7d0259e393fd7902dacc867b9a commit 25a4a79ccca09a7d0259e393fd7902dacc867b9a Author: Roger Pau Monné <royger@FreeBSD.org> AuthorDate: 2021-08-11 14:55:10 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-08-23 23:21:15 +0000 loader: fix multiboot loading on UEFI (cherry picked from commit 5e4279a8f35aa4b46debf728d3f743d64f15aaf8) --- stand/common/load_elf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c index 9ae91036dbb4..c163b50c9737 100644 --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -447,7 +447,7 @@ __elfN(loadfile_raw)(char *filename, uint64_t dest, *result = (struct preloaded_file *)fp; err = 0; #ifdef __amd64__ - fp->f_kernphys_relocatable = is_kernphys_relocatable(&ef); + fp->f_kernphys_relocatable = multiboot || is_kernphys_relocatable(&ef); #endif goto out; @@ -1253,6 +1253,11 @@ __elfN(lookup_symbol)(elf_file_t ef, const char* name, Elf_Sym *symp, char *strp; unsigned long hash; + if (ef->nbuckets == 0) { + printf(__elfN(bad_symtable)); + return ENOENT; + } + hash = elf_hash(name); COPYOUT(&ef->buckets[hash % ef->nbuckets], &symnum, sizeof(symnum));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108232322.17NNMRmh094756>