mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
stand: Load INIT_ARRAY and FINI_ARRAY sections
This is required for preloading modules into a KASAN-configured kernel.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 7b1b5aad95)
This commit is contained in:
parent
30e25f9304
commit
7cde0b06f9
1 changed files with 2 additions and 0 deletions
|
|
@ -264,6 +264,8 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
|
|||
#if defined(__i386__) || defined(__amd64__)
|
||||
case SHT_X86_64_UNWIND:
|
||||
#endif
|
||||
case SHT_INIT_ARRAY:
|
||||
case SHT_FINI_ARRAY:
|
||||
if ((shdr[i].sh_flags & SHF_ALLOC) == 0)
|
||||
break;
|
||||
lastaddr = roundup(lastaddr, shdr[i].sh_addralign);
|
||||
|
|
|
|||
Loading…
Reference in a new issue