From dad90af48902731a920169292dc39a19d544fd49 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 6 Mar 2016 15:57:43 +0000 Subject: Since kernel modules can now contain sections of type SHT_AMD64_UNWIND, the boot loader should not skip over these anymore while loading images. Otherwise the kernel can still panic when it doesn't find the .eh_frame section belonging to the .rela.eh_frame section. Unfortunately this will require installing boot loaders from sys/boot before attempting to boot with a new kernel. Reviewed by: kib MFC after: 2 weeks X-MFC-With: r296419 --- sys/boot/common/load_elf_obj.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/boot/common/load_elf_obj.c') diff --git a/sys/boot/common/load_elf_obj.c b/sys/boot/common/load_elf_obj.c index 869f020..285a88e 100644 --- a/sys/boot/common/load_elf_obj.c +++ b/sys/boot/common/load_elf_obj.c @@ -221,6 +221,9 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) switch (shdr[i].sh_type) { case SHT_PROGBITS: case SHT_NOBITS: +#if defined(__i386__) || defined(__amd64__) + case SHT_AMD64_UNWIND: +#endif lastaddr = roundup(lastaddr, shdr[i].sh_addralign); shdr[i].sh_addr = (Elf_Addr)lastaddr; lastaddr += shdr[i].sh_size; -- cgit v1.1