Added preliminary support for execve(). Updates to clone, fork, exit, task handling.

It turned out we used one version of kmalloc for malloc() and another for kfree()!
Now fixed.
Added parent-child relationship to tasks. Need to polish handling CLONE_PARENT and THREAD.
This commit is contained in:
Bahadir Balban
2008-11-19 12:59:52 +02:00
parent d182b5b35a
commit 46937eab88
39 changed files with 502 additions and 1192 deletions

View File

@@ -0,0 +1,35 @@
/*
* Definitions for ELF program headers
* Based on Portable Formats Specification v1.1
*
* Copyright (C) 2008 Bahadir Balban
*/
#ifndef __ELFPRG_H__
#define __ELFPRG_H__
#include <l4/types.h>
struct elf_program_header {
u32 p_type; /* Type of segment */
u32 p_offset; /* Segment file offset */
u32 p_vaddr; /* Virtual start address */
u32 p_paddr; /* Physical start address */
u32 p_filesz; /* Size in stored file */
u32 p_memsz; /* Size in memory image */
u32 p_flags; /* Segment attributes */
u32 p_align; /* Alignment requirement */
} __attribute__((__packed__));
/* Program segment type definitions */
#define PT_NULL 0
#define PT_LOAD 1
#define PT_DYNAMIC 2
#define PT_INTERP 3
#define PT_NOTE 4
#define PT_SHLIB 5
#define PT_PHDR 6
#define PT_LOPROC 0x70000000
#define PT_HIPROC 0x7FFFFFFF
#endif /* __ELFPRG_H__ */

View File

@@ -3,6 +3,7 @@
#include <stddef.h>
#include <string.h>
#include <stdio.h>
void *kmalloc(size_t size);
void kfree(void *blk);