feat: compilation du noyau en code non relocalisable, commande task_create quasi terminée. Allocation dynamique de page pour les programmes utilisateurs dans exception14 (PGFAULT)

This commit is contained in:
Nicolas Hordé 2018-12-10 17:03:52 +01:00
parent f0f36a0f5c
commit a31cf264c3
8 changed files with 308 additions and 54 deletions

View File

@ -143,3 +143,7 @@ void task_init();
u32 task_getfreePID ();
u32 task_usePID (u32 pid);
u32 task_create();
u32 elf_test(u8 *src);
u32 elf_load(u8 *src, u32 pid);
process *getcurrentprocess();
void task_run(u32 pid);

View File

@ -9,6 +9,7 @@
#include "gdt.h"
#include "system.h"
#include "debug.h"
#include "process.h"
#define IDT_SIZE 256 /* nombre de descripteurs */
@ -401,6 +402,16 @@ void exception13()
cpuerror("#GP General protection fault (GPF)",dump);
}
static u8 ex14_errors1[]="Supervisory process tried to read a non-present page entry";
static u8 ex14_errors2[]="Supervisory process tried to read a page and caused a protection fault";
static u8 ex14_errors3[]="Supervisory process tried to write to a non-present page entry";
static u8 ex14_errors4[]="Supervisory process tried to write a page and caused a protection fault";
static u8 ex14_errors5[]="User process tried to read a non-present page entry";
static u8 ex14_errors6[]="User process tried to read a page and caused a protection fault";
static u8 ex14_errors7[]="User process tried to write to a non-present page entry";
static u8 ex14_errors8[]="User process tried to write a page and caused a protection fault";
static u8 *ex14_errors[]={&ex14_errors1,&ex14_errors2,&ex14_errors3,&ex14_errors4,&ex14_errors5,&ex14_errors6,&ex14_errors7,&ex14_errors8};
void exception14()
{
regs *dump;
@ -413,37 +424,20 @@ void exception14()
dump->esp=*oldesp;
dump->ebp=*((u32 *) dump->esp);
dump->eip=current->eip;
u8* errorstring;
u8 completeerrorstring[255];
switch (current->error_code & 0xF) {
case 0:
errorstring="Supervisory process tried to read a non-present page entry";
break;
case 1:
errorstring="Supervisory process tried to read a page and caused a protection fault";
break;
case 2:
errorstring="Supervisory process tried to write to a non-present page entry";
break;
case 3:
errorstring="Supervisory process tried to write a page and caused a protection fault";
break;
case 4:
errorstring="User process tried to read a non-present page entry";
break;
case 5:
errorstring="User process tried to read a page and caused a protection fault";
break;
case 6:
errorstring="User process tried to write to a non-present page entry";
break;
case 7:
errorstring="User process tried to write a page and caused a protection fault";
break;
}
// printf("%X",current->error_code);
sprintf(&completeerrorstring,"#PF Page fault - %s at adress %X",errorstring,dump->cr2);
cpuerror(&completeerrorstring,dump);
if (dump->cr2 >= USER_CODE && dump->cr2 < USER_STACK)
{
virtual_range_new(getcurrentprocess()->pdd, (u8 *) (dump->cr2 & 0xFFFFF000), PAGESIZE, PAGE_ALL);
}
else {
printf("Page fault - %s at adress %Y cs:eip - %Y:%Y\r\n",ex14_errors[current->error_code & 0xF],dump->cr2,dump->cs,dump->eip);
cpuerror("#SS Page fault",dump);
}
dump->ebp=oldesp;
restdebugcpu();
leave();
sti();
asm("addl $0x04,%%esp"::);
iret();
}
void exception15()

View File

@ -1,4 +1,4 @@
CC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -m32 -F elf_i386 -I ../include
CC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -m32 -F elf_i386 -fno-pie -no-pie -I ../include
LINK=ld -m elf_i386 -r -o
SRCS= $(wildcard *.c)
OBJS= $(SRCS:.c=.o)

View File

@ -12,13 +12,13 @@ process *current;
u32 lastpid;
u8 elf_errors1[]="Aucune signature ELF";
u8 elf_errors2[]="Fichier au format ELF mais non 32 bits";
u8 elf_errors3[]="ELF non LSB";
u8 elf_errors4[]="ELF mauvaise version";
u8 elf_errors5[]="ELF pour OS ne correspondant pas";
u8 elf_errors6[]="Mauvais type de machine";
u8 *elf_errors[6]={&elf_errors1,&elf_errors2,&elf_errors3,&elf_errors4,&elf_errors5,&elf_errors6};
static u8 elf_errors1[]="Aucune signature ELF";
static u8 elf_errors2[]="Fichier au format ELF mais non 32 bits";
static u8 elf_errors3[]="ELF non LSB";
static u8 elf_errors4[]="ELF mauvaise version";
static u8 elf_errors5[]="ELF pour OS ne correspondant pas";
static u8 elf_errors6[]="Mauvais type de machine";
static u8 *elf_errors[]={&elf_errors1,&elf_errors2,&elf_errors3,&elf_errors4,&elf_errors5,&elf_errors6};
/*******************************************************************************/
/* Vérifie la signature ELF
@ -44,7 +44,7 @@ u32 elf_test(u8 *src)
return 4;
if (header->e_ident[EI_OSABI]!=ELFOSABI_COS2000)
return 5;
if (header->e_machine==EM_386)
if (header->e_machine!=EM_386)
return 6;
return 0;
}
@ -68,7 +68,7 @@ u32 elf_load(u8 *src, u32 pid)
program = (elf32p *) (src + header->e_phoff);
code=elf_test(src);
if (code!=0) {
printf("Mauvais format ELF : N°%s !\r\n",elf_errors[code-1]);
printf("Erreur de chargement ELF, %s !\r\n",elf_errors[code-1]);
return NULL;
}
for (i = 0; i < header->e_phnum; i++, program++) {
@ -91,12 +91,13 @@ u32 elf_load(u8 *src, u32 pid)
processes[pid].bss_low = (u8*) v_begin;
processes[pid].bss_high = (u8*) v_end;
}
memcpy((u8 *) v_begin, (u8 *) (src + program->p_offset), program->p_filesz,0);
memcpy((u8 *) (src + program->p_offset),(u8 *) v_begin , program->p_filesz,0);
if (program->p_memsz > program->p_filesz)
for (i = program->p_filesz, ptr = (u8 *) program->p_vaddr; i < program->p_memsz; i++)
ptr[i] = 0;
}
}
processes[pid].entry=header->e_entry;
return header->e_entry;
}
@ -133,6 +134,13 @@ u32 task_getfreePID ()
return i;
}
/*******************************************************************************/
/* Récupère les informations sur le processus courant */
process *getcurrentprocess()
{
return current;
}
/*******************************************************************************/
/* Determine le dernier PID occupé */
@ -141,11 +149,19 @@ u32 task_usePID (u32 pid)
lastpid=pid;
}
/*******************************************************************************/
/* Execute une tâche */
void task_run(u32 pid)
{
processes[pid].status = STATUS_RUN;
}
/*******************************************************************************/
/* Initialise une tâche */
u32 task_create(u8 *code)
{
{
process *previous=current;
u32 pid=task_getfreePID();
task_usePID(pid);
@ -156,15 +172,17 @@ u32 task_create(u8 *code)
current = &processes[pid];
setcr3(processes[pid].pdd->addr->paddr);
kstack = virtual_page_getfree();
processes[pid].dump.ss = SEL_USER_STACK || RPL_RING3;
processes[pid].dump.ss = SEL_USER_STACK | RPL_RING3;
processes[pid].dump.esp = USER_STACK;
processes[pid].dump.eflags = 0x0;
processes[pid].dump.cs = SEL_USER_CODE || RPL_RING3;
processes[pid].dump.cs = SEL_USER_CODE | RPL_RING3;
processes[pid].dump.eip = elf_load(code,pid);
processes[pid].dump.ds = SEL_USER_DATA || RPL_RING3;
processes[pid].dump.es = SEL_USER_DATA || RPL_RING3;
processes[pid].dump.fs = SEL_USER_DATA || RPL_RING3;
processes[pid].dump.gs = SEL_USER_DATA || RPL_RING3;
if (processes[pid].dump.eip==NULL)
return NULL;
processes[pid].dump.ds = SEL_USER_DATA | RPL_RING3;
processes[pid].dump.es = SEL_USER_DATA | RPL_RING3;
processes[pid].dump.fs = SEL_USER_DATA | RPL_RING3;
processes[pid].dump.gs = SEL_USER_DATA | RPL_RING3;
processes[pid].dump.cr3 = (u32) processes[pid].pdd->addr->paddr;
processes[pid].kstack.ss0 = SEL_KERNEL_STACK;
processes[pid].kstack.esp0 = (u32) kstack->vaddr + PAGESIZE - 16;
@ -178,6 +196,14 @@ u32 task_create(u8 *code)
processes[pid].result = 0;
processes[pid].status = STATUS_READY;
current = previous;
setcr3(current->dump.cr3);
return pid;
if (current==NULL)
{
u32 pd = KERNEL_PD_ADDR;
setcr3(pd);
}
else
{
setcr3(current->dump.cr3);
}
return pid;
}

View File

@ -41,7 +41,7 @@ static command commands[] = {
{"font" , "", &sfont},
{"test3d" , "", &test3d},
{"detectpci" , "", &detectpci},
{"wmem" , "", &showmem},
{"mem" , "", &showmem},
{"testmem" , "", &testmem},
{"testcall" , "", &testcall},
{"testtask" , "", &testtask},
@ -87,9 +87,14 @@ int test(void)
/*******************************************************************************/
/* Test l'usage de création de tâche */
#include "test.c"
int testtask()
{
task_init();
print("*** Creation d'une tache");
u32 pid=task_create(&programs_test);
task_run(pid);
}
/*******************************************************************************/

225
lib/test.c Normal file
View File

@ -0,0 +1,225 @@
/*
Programme de test compilé en mode USER avec SYSCALL, le binaire est intégré au noyau pour test en attendant d'avoir un pilot de disque */
#include "types.h"
static u8 programs_test[] = {
0x7f, 0x45, 0x4c, 0x46, 0x01, 0x01, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x20, 0x00, 0x02, 0x00, 0x28, 0x00,
0x0e, 0x00, 0x0d, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0xdc, 0x00, 0x00, 0x00,
0xdc, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x51, 0xe5, 0x74, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x8d, 0x4c, 0x24, 0x04,
0x83, 0xe4, 0xf0, 0xff, 0x71, 0xfc, 0x55, 0x89, 0xe5, 0x53, 0x51, 0xe8,
0x38, 0x00, 0x00, 0x00, 0x05, 0xbc, 0x00, 0x00, 0x00, 0x89, 0xc3, 0xe8,
0x08, 0x00, 0x00, 0x00, 0x90, 0x59, 0x5b, 0x5d, 0x8d, 0x61, 0xfc, 0xc3,
0x55, 0x89, 0xe5, 0x83, 0xec, 0x10, 0xe8, 0x19, 0x00, 0x00, 0x00, 0x05,
0x9d, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x89, 0xe1, 0xba,
0x46, 0x00, 0x00, 0x40, 0x0f, 0x34, 0x89, 0x45, 0xfc, 0x90, 0xc9, 0xc3,
0x8b, 0x04, 0x24, 0xc3, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x7a, 0x52, 0x00, 0x01, 0x7c, 0x08, 0x01, 0x1b, 0x0c, 0x04, 0x04,
0x88, 0x01, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
0x90, 0xff, 0xff, 0xff, 0x28, 0x00, 0x00, 0x00, 0x00, 0x44, 0x0c, 0x01,
0x00, 0x47, 0x10, 0x05, 0x02, 0x75, 0x00, 0x44, 0x0f, 0x03, 0x75, 0x78,
0x06, 0x10, 0x03, 0x02, 0x75, 0x7c, 0x53, 0xc1, 0x0c, 0x01, 0x00, 0x41,
0xc3, 0x41, 0xc5, 0x43, 0x0c, 0x04, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00,
0x50, 0x00, 0x00, 0x00, 0xa8, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
0x70, 0xff, 0xff, 0xff, 0x24, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08,
0x85, 0x02, 0x42, 0x0d, 0x05, 0x60, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x96, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01,
0x2a, 0x00, 0x00, 0x00, 0x0c, 0x89, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x01, 0x06, 0x84, 0x00, 0x00, 0x00, 0x02, 0x02, 0x05, 0xcc,
0x00, 0x00, 0x00, 0x03, 0x04, 0x05, 0x69, 0x6e, 0x74, 0x00, 0x02, 0x08,
0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x05, 0x05, 0x00, 0x00, 0x00,
0x02, 0x01, 0x06, 0x7d, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x7b, 0x00,
0x00, 0x00, 0x02, 0x02, 0x07, 0xb3, 0x00, 0x00, 0x00, 0x02, 0x04, 0x07,
0x18, 0x00, 0x00, 0x00, 0x02, 0x08, 0x07, 0x13, 0x00, 0x00, 0x00, 0x02,
0x04, 0x07, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x25, 0x00, 0x00, 0x00, 0x7d,
0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0xc6, 0x00, 0x00, 0x00, 0x02, 0x25,
0x72, 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00,
0x00, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x01, 0x9c, 0x00, 0xbd, 0x00,
0x00, 0x00, 0x04, 0x00, 0x61, 0x00, 0x00, 0x00, 0x04, 0x01, 0x0d, 0x01,
0x00, 0x00, 0x0c, 0xd6, 0x00, 0x00, 0x00, 0xe6, 0x00, 0x00, 0x00, 0x28,
0x00, 0x00, 0x40, 0x24, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x02,
0x01, 0x06, 0x84, 0x00, 0x00, 0x00, 0x02, 0x02, 0x05, 0xcc, 0x00, 0x00,
0x00, 0x03, 0x04, 0x05, 0x69, 0x6e, 0x74, 0x00, 0x02, 0x08, 0x05, 0x00,
0x00, 0x00, 0x00, 0x02, 0x04, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x01,
0x06, 0x7d, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x7b, 0x00, 0x00, 0x00,
0x02, 0x02, 0x07, 0xb3, 0x00, 0x00, 0x00, 0x02, 0x04, 0x07, 0x18, 0x00,
0x00, 0x00, 0x02, 0x08, 0x07, 0x13, 0x00, 0x00, 0x00, 0x04, 0x75, 0x33,
0x32, 0x00, 0x02, 0x1d, 0x76, 0x00, 0x00, 0x00, 0x02, 0x04, 0x07, 0x1d,
0x00, 0x00, 0x00, 0x05, 0x25, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00,
0x06, 0x00, 0x07, 0xc6, 0x00, 0x00, 0x00, 0x02, 0x25, 0x7d, 0x00, 0x00,
0x00, 0x08, 0xdd, 0x00, 0x00, 0x00, 0x01, 0x09, 0x6b, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x40, 0x24, 0x00, 0x00, 0x00, 0x01, 0x9c, 0x09, 0x38,
0x00, 0x00, 0x40, 0x11, 0x00, 0x00, 0x00, 0x0a, 0x5f, 0x76, 0x00, 0x01,
0x0b, 0x6b, 0x00, 0x00, 0x00, 0x02, 0x91, 0x74, 0x00, 0x00, 0x00, 0x01,
0x11, 0x01, 0x25, 0x0e, 0x13, 0x0b, 0x03, 0x0e, 0x1b, 0x0e, 0x11, 0x01,
0x12, 0x06, 0x10, 0x17, 0x00, 0x00, 0x02, 0x24, 0x00, 0x0b, 0x0b, 0x3e,
0x0b, 0x03, 0x0e, 0x00, 0x00, 0x03, 0x24, 0x00, 0x0b, 0x0b, 0x3e, 0x0b,
0x03, 0x08, 0x00, 0x00, 0x04, 0x01, 0x01, 0x49, 0x13, 0x01, 0x13, 0x00,
0x00, 0x05, 0x21, 0x00, 0x00, 0x00, 0x06, 0x34, 0x00, 0x03, 0x0e, 0x3a,
0x0b, 0x3b, 0x0b, 0x49, 0x13, 0x3f, 0x19, 0x3c, 0x19, 0x00, 0x00, 0x07,
0x2e, 0x00, 0x3f, 0x19, 0x03, 0x0e, 0x3a, 0x0b, 0x3b, 0x0b, 0x27, 0x19,
0x11, 0x01, 0x12, 0x06, 0x40, 0x18, 0x96, 0x42, 0x19, 0x00, 0x00, 0x00,
0x01, 0x11, 0x01, 0x25, 0x0e, 0x13, 0x0b, 0x03, 0x0e, 0x1b, 0x0e, 0x11,
0x01, 0x12, 0x06, 0x10, 0x17, 0x00, 0x00, 0x02, 0x24, 0x00, 0x0b, 0x0b,
0x3e, 0x0b, 0x03, 0x0e, 0x00, 0x00, 0x03, 0x24, 0x00, 0x0b, 0x0b, 0x3e,
0x0b, 0x03, 0x08, 0x00, 0x00, 0x04, 0x16, 0x00, 0x03, 0x08, 0x3a, 0x0b,
0x3b, 0x0b, 0x49, 0x13, 0x00, 0x00, 0x05, 0x01, 0x01, 0x49, 0x13, 0x01,
0x13, 0x00, 0x00, 0x06, 0x21, 0x00, 0x00, 0x00, 0x07, 0x34, 0x00, 0x03,
0x0e, 0x3a, 0x0b, 0x3b, 0x0b, 0x49, 0x13, 0x3f, 0x19, 0x3c, 0x19, 0x00,
0x00, 0x08, 0x2e, 0x01, 0x3f, 0x19, 0x03, 0x0e, 0x3a, 0x0b, 0x3b, 0x0b,
0x27, 0x19, 0x49, 0x13, 0x11, 0x01, 0x12, 0x06, 0x40, 0x18, 0x97, 0x42,
0x19, 0x00, 0x00, 0x09, 0x0b, 0x01, 0x11, 0x01, 0x12, 0x06, 0x00, 0x00,
0x0a, 0x34, 0x00, 0x03, 0x08, 0x3a, 0x0b, 0x3b, 0x0b, 0x49, 0x13, 0x02,
0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x40, 0x24, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x02, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01, 0x01, 0xfb, 0x0e, 0x0d, 0x00,
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x2e,
0x2f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x00, 0x00, 0x74, 0x65,
0x73, 0x74, 0x2e, 0x63, 0x00, 0x00, 0x00, 0x00, 0x74, 0x79, 0x70, 0x65,
0x73, 0x2e, 0x68, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x00,
0x00, 0x00, 0x40, 0x1a, 0x08, 0x83, 0x75, 0x02, 0x08, 0x00, 0x01, 0x01,
0x4b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x33, 0x00, 0x00, 0x00, 0x01, 0x01,
0xfb, 0x0e, 0x0d, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x01, 0x2e, 0x2e, 0x2f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64,
0x65, 0x00, 0x00, 0x6c, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x00, 0x00, 0x00,
0x00, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x68, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x05, 0x02, 0x28, 0x00, 0x00, 0x40, 0x03, 0x09, 0x01, 0xf3,
0x08, 0x13, 0x02, 0x03, 0x00, 0x01, 0x01, 0x6c, 0x6f, 0x6e, 0x67, 0x20,
0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x6d, 0x61, 0x69,
0x6e, 0x00, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20,
0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74,
0x00, 0x47, 0x4e, 0x55, 0x20, 0x43, 0x31, 0x31, 0x20, 0x37, 0x2e, 0x33,
0x2e, 0x30, 0x20, 0x2d, 0x6d, 0x33, 0x32, 0x20, 0x2d, 0x6d, 0x74, 0x75,
0x6e, 0x65, 0x3d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x2d,
0x6d, 0x61, 0x72, 0x63, 0x68, 0x3d, 0x69, 0x36, 0x38, 0x36, 0x20, 0x2d,
0x67, 0x20, 0x2d, 0x4f, 0x30, 0x20, 0x2d, 0x66, 0x66, 0x72, 0x65, 0x65,
0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x2d, 0x66, 0x6e,
0x6f, 0x2d, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x00, 0x75, 0x6e,
0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x00,
0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x00, 0x2f, 0x68, 0x6f, 0x6d, 0x65,
0x2f, 0x6e, 0x69, 0x6b, 0x6f, 0x2f, 0x42, 0x75, 0x72, 0x65, 0x61, 0x75,
0x2f, 0x63, 0x6f, 0x73, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x70, 0x72, 0x6f,
0x67, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20,
0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74,
0x00, 0x63, 0x74, 0x79, 0x70, 0x65, 0x00, 0x73, 0x68, 0x6f, 0x72, 0x74,
0x20, 0x69, 0x6e, 0x74, 0x00, 0x6c, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x00,
0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x00, 0x2f, 0x68, 0x6f,
0x6d, 0x65, 0x2f, 0x6e, 0x69, 0x6b, 0x6f, 0x2f, 0x42, 0x75, 0x72, 0x65,
0x61, 0x75, 0x2f, 0x63, 0x6f, 0x73, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x70,
0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x6c, 0x69, 0x62, 0x00,
0x47, 0x4e, 0x55, 0x20, 0x43, 0x31, 0x31, 0x20, 0x37, 0x2e, 0x33, 0x2e,
0x30, 0x20, 0x2d, 0x46, 0x65, 0x6c, 0x66, 0x2d, 0x69, 0x33, 0x38, 0x36,
0x20, 0x2d, 0x6d, 0x33, 0x32, 0x20, 0x2d, 0x6d, 0x74, 0x75, 0x6e, 0x65,
0x3d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x2d, 0x6d, 0x61,
0x72, 0x63, 0x68, 0x3d, 0x69, 0x36, 0x38, 0x36, 0x20, 0x2d, 0x67, 0x20,
0x2d, 0x4f, 0x30, 0x20, 0x2d, 0x66, 0x66, 0x72, 0x65, 0x65, 0x73, 0x74,
0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x2d, 0x66, 0x6e, 0x6f, 0x2d,
0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x00, 0x47, 0x43, 0x43, 0x3a,
0x20, 0x28, 0x55, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x20, 0x37, 0x2e, 0x33,
0x2e, 0x30, 0x2d, 0x32, 0x37, 0x75, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x31,
0x7e, 0x31, 0x38, 0x2e, 0x30, 0x34, 0x29, 0x20, 0x37, 0x2e, 0x33, 0x2e,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x40,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0xd0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0xf1, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf1, 0xff,
0x0f, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x40,
0x00, 0x00, 0x00, 0x00, 0x12, 0x02, 0x02, 0x00, 0x3b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x28, 0x00, 0x00, 0x00, 0x12, 0x00, 0x01, 0x00,
0x40, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x40, 0x24, 0x00, 0x00, 0x00,
0x12, 0x00, 0x01, 0x00, 0x00, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x00,
0x6c, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x00, 0x5f, 0x47, 0x4c, 0x4f, 0x42,
0x41, 0x4c, 0x5f, 0x4f, 0x46, 0x46, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x41,
0x42, 0x4c, 0x45, 0x5f, 0x00, 0x5f, 0x5f, 0x78, 0x38, 0x36, 0x2e, 0x67,
0x65, 0x74, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x68, 0x75, 0x6e, 0x6b, 0x2e,
0x61, 0x78, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x74, 0x65, 0x73, 0x74,
0x5f, 0x61, 0x70, 0x69, 0x00, 0x00, 0x2e, 0x73, 0x79, 0x6d, 0x74, 0x61,
0x62, 0x00, 0x2e, 0x73, 0x74, 0x72, 0x74, 0x61, 0x62, 0x00, 0x2e, 0x73,
0x68, 0x73, 0x74, 0x72, 0x74, 0x61, 0x62, 0x00, 0x2e, 0x74, 0x65, 0x78,
0x74, 0x00, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x5f, 0x5f, 0x78, 0x38,
0x36, 0x2e, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x68, 0x75,
0x6e, 0x6b, 0x2e, 0x61, 0x78, 0x00, 0x2e, 0x65, 0x68, 0x5f, 0x66, 0x72,
0x61, 0x6d, 0x65, 0x00, 0x2e, 0x67, 0x6f, 0x74, 0x2e, 0x70, 0x6c, 0x74,
0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x61, 0x62, 0x62, 0x72,
0x65, 0x76, 0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x61, 0x72,
0x61, 0x6e, 0x67, 0x65, 0x73, 0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67,
0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67,
0x5f, 0x73, 0x74, 0x72, 0x00, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x74, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x4c, 0x00, 0x00, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x40, 0xc4, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x40,
0x44, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x5b, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0x02, 0x00, 0x00,
0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x94, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x79, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xd4, 0x03, 0x00, 0x00, 0x9b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x04, 0x00, 0x00,
0x69, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xd8, 0x05, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00,
0x0c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x07, 0x00, 0x00,
0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x6d, 0x07, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

View File

@ -31,7 +31,7 @@ clean:
littleclean:
make -C system clean
make -C lib clean
make -C final littleclean)
make -C final littleclean
make -C programs clean
sync

View File

@ -1,4 +1,4 @@
GCC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -I ../include -m32 -c -o
GCC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -I ../include -m32 -fno-pie -no-pie -c -o
ASM=nasm
LINK=ld -m elf_i386 -T linker.lds -n -o