diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c --- a/stand/common/load_elf.c +++ b/stand/common/load_elf.c @@ -639,7 +639,10 @@ continue; /* We want to load PT_LOAD segments only.. */ - if (phdr[i].p_type != PT_LOAD) + /* If it is kernel, we load the note to make debugger match with + * coredump */ + if (phdr[i].p_type != PT_LOAD && + !(ef->kernel && phdr[i].p_type == PT_NOTE)) continue; if (module_verbose >= MODULE_VERBOSE_FULL) {