Fix for core NOTE alignment & al.
This commit is contained in:
@ -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++;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user