Fix for core NOTE alignment & al.

This commit is contained in:
Naoki Hamada
2014-07-17 16:56:28 +09:00
parent 3e8083efc1
commit 97a74f4692
2 changed files with 6 additions and 6 deletions

View File

@ -296,7 +296,7 @@ int gencore(struct process *proc, void *regs,
ph[0].p_offset = offset; ph[0].p_offset = offset;
ph[0].p_vaddr = 0; ph[0].p_vaddr = 0;
ph[0].p_paddr = 0; ph[0].p_paddr = 0;
ph[0].p_filesz = 0; ph[0].p_filesz = notesize;
ph[0].p_memsz = notesize; ph[0].p_memsz = notesize;
ph[0].p_align = 1024; ph[0].p_align = 1024;
@ -316,7 +316,7 @@ int gencore(struct process *proc, void *regs,
ph[i].p_offset = offset; ph[i].p_offset = offset;
ph[i].p_vaddr = range->start; ph[i].p_vaddr = range->start;
ph[i].p_paddr = 0; 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_memsz = size;
ph[i].p_align = 1024; /* ??? */ ph[i].p_align = 1024; /* ??? */
i++; i++;

View File

@ -75,10 +75,10 @@ typedef struct {
#define PF_R 4 /* readable bit */ #define PF_R 4 /* readable bit */
struct note { struct note {
Elf64_Xword namesz; Elf64_Word namesz;
Elf64_Xword descsz; Elf64_Word descsz;
Elf64_Xword type; Elf64_Word type;
char *contents; /* name char[namesz] and desc[descsz] */ /* name char[namesz] and desc[descsz] */
}; };
#define NT_PRSTATUS 1 #define NT_PRSTATUS 1