diff --git a/arch/x86/kernel/gencore.c b/arch/x86/kernel/gencore.c index a8b2e150..f7d91713 100644 --- a/arch/x86/kernel/gencore.c +++ b/arch/x86/kernel/gencore.c @@ -296,7 +296,7 @@ int gencore(struct process *proc, void *regs, ph[0].p_offset = offset; ph[0].p_vaddr = 0; ph[0].p_paddr = 0; - ph[0].p_filesz = 0; + ph[0].p_filesz = notesize; ph[0].p_memsz = notesize; ph[0].p_align = 1024; @@ -316,7 +316,7 @@ int gencore(struct process *proc, void *regs, ph[i].p_offset = offset; ph[i].p_vaddr = range->start; ph[i].p_paddr = 0; - ph[i].p_filesz = 0; /* How can we know this? */ + ph[i].p_filesz = size; ph[i].p_memsz = size; ph[i].p_align = 1024; /* ??? */ i++; diff --git a/arch/x86/kernel/include/elfcore.h b/arch/x86/kernel/include/elfcore.h index 23f61efe..821a5b42 100644 --- a/arch/x86/kernel/include/elfcore.h +++ b/arch/x86/kernel/include/elfcore.h @@ -75,10 +75,10 @@ typedef struct { #define PF_R 4 /* readable bit */ struct note { - Elf64_Xword namesz; - Elf64_Xword descsz; - Elf64_Xword type; - char *contents; /* name char[namesz] and desc[descsz] */ + Elf64_Word namesz; + Elf64_Word descsz; + Elf64_Word type; + /* name char[namesz] and desc[descsz] */ }; #define NT_PRSTATUS 1