mirror of
https://github.com/drasko/codezero.git
synced 2026-10-25 19:27:28 +01:00
Changes since April
Clean up of build directories. Simplifications to capability model.
This commit is contained in:
@@ -6,7 +6,7 @@ import os, sys
|
||||
arch = config.arch
|
||||
|
||||
sys.path.append('../../../../')
|
||||
from config.lib import *
|
||||
from scripts.config.lib import *
|
||||
from tools.pyelf.lmanext import *
|
||||
|
||||
src = [Glob('*.c') + Glob('test_exec.S') + Glob('src/*.[Sc]') + Glob('src/arch/arm/*.c')]
|
||||
|
||||
@@ -3,12 +3,10 @@
|
||||
#
|
||||
# Copyright (C) 2007 Bahadir Balban
|
||||
#
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import os, sys, shutil
|
||||
from os.path import join
|
||||
from glob import glob
|
||||
from configure import *
|
||||
from scripts.config.config_invoke import *
|
||||
|
||||
config = configuration_retrieve()
|
||||
|
||||
|
||||
@@ -11,38 +11,60 @@ __stack = (virtual_base - 0x1000 - 8); /* First page before the env/args */
|
||||
|
||||
offset = virtual_base - physical_base;
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
|
||||
PHDRS
|
||||
{
|
||||
rx PT_LOAD;
|
||||
rw PT_LOAD;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = virtual_base;
|
||||
|
||||
/* Put all RX, RO sections here */
|
||||
_start_text = .;
|
||||
.text : AT (ADDR(.text) - offset) {
|
||||
.text : AT (ADDR(.text) - offset)
|
||||
{
|
||||
*(.text.head)
|
||||
*(.text)
|
||||
}
|
||||
.rodata : AT (ADDR(.rodata) - offset) {
|
||||
} : rx = 0x90909090
|
||||
|
||||
.rodata : AT (ADDR(.rodata) - offset)
|
||||
{
|
||||
*(.rodata)
|
||||
}
|
||||
.rodata1 : AT (ADDR(.rodata1) - offset) {
|
||||
} : rx = 0x90909090
|
||||
.rodata1 : AT (ADDR(.rodata1) - offset)
|
||||
{
|
||||
*(.rodata1)
|
||||
}
|
||||
} : rx = 0x90909090
|
||||
|
||||
. = ALIGN(4K);
|
||||
.data : AT (ADDR(.data) - offset) {
|
||||
|
||||
/* Put all RW sections here */
|
||||
.data : AT (ADDR(.data) - offset)
|
||||
{
|
||||
_start_test_exec = .;
|
||||
*(.testexec)
|
||||
_end_test_exec = .;
|
||||
*(.data)
|
||||
}
|
||||
.got : AT (ADDR(.got) - offset) {
|
||||
} : rw
|
||||
|
||||
.got : AT (ADDR(.got) - offset)
|
||||
{
|
||||
*(.got)
|
||||
}
|
||||
.got.plt : AT (ADDR(.got.plt) - offset) {
|
||||
} : rw
|
||||
|
||||
.got.plt : AT (ADDR(.got.plt) - offset)
|
||||
{
|
||||
*(.got.plt)
|
||||
}
|
||||
.bss : AT (ADDR(.bss) - offset) {
|
||||
} : rw
|
||||
|
||||
.bss : AT (ADDR(.bss) - offset)
|
||||
{
|
||||
*(.bss)
|
||||
}
|
||||
} : rw
|
||||
_end = .;
|
||||
}
|
||||
|
||||
@@ -8,18 +8,29 @@ virtual_base = %s;
|
||||
|
||||
/* First page before the env/args */
|
||||
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
ENTRY(_start)
|
||||
|
||||
PHDRS
|
||||
{
|
||||
rx PT_LOAD;
|
||||
rw PT_LOAD;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = virtual_base;
|
||||
.text : { *(.text.head) *(.text) }
|
||||
.rodata : { *(.rodata) }
|
||||
.rodata1 : { *(.rodata1) }
|
||||
|
||||
/* RX, RO sections */
|
||||
.text : { *(.text.head) *(.text) } : rx =0x90909090
|
||||
.rodata : { *(.rodata) } : rx =0x90909090
|
||||
.rodata1 : { *(.rodata1) } : rx =0x90909090
|
||||
|
||||
. = ALIGN(4K);
|
||||
.data : { *(.data) }
|
||||
.got : { *(.got) }
|
||||
.got.plt : { *(.got.plt) }
|
||||
.bss : { *(.bss) }
|
||||
|
||||
/* RW sections */
|
||||
.data : { *(.data) } : rw
|
||||
.got : { *(.got) } : rw
|
||||
.got.plt : { *(.got.plt) } :rw
|
||||
.bss : { *(.bss) } : rw
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ void ipc_extended_test(void)
|
||||
/* This test makes this assumption */
|
||||
BUG_ON(L4_IPC_EXTENDED_MAX_SIZE > PAGE_SIZE);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Request capability to ipc to each other from pager
|
||||
* (Actually only the sender needs it)
|
||||
@@ -92,6 +93,7 @@ void ipc_extended_test(void)
|
||||
"err = %d\n", err);
|
||||
goto out_err;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Both child and parent gets 2 pages
|
||||
|
||||
@@ -36,7 +36,6 @@ int user_mutex_test(void)
|
||||
{
|
||||
pid_t child, parent;
|
||||
int map_size = PAGE_SIZE;
|
||||
struct capability cap;
|
||||
void *base;
|
||||
int err;
|
||||
|
||||
@@ -74,7 +73,7 @@ int user_mutex_test(void)
|
||||
test_printf("%d: Created child with pid %d\n", getpid(), child);
|
||||
else
|
||||
test_printf("Child %d running.\n", getpid());
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* Request capability to ipc to each other from pager
|
||||
* (Actually only the sender needs it)
|
||||
@@ -95,6 +94,7 @@ int user_mutex_test(void)
|
||||
"err = %d\n", err);
|
||||
goto out_err;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Child locks and produces */
|
||||
if (child == 0) {
|
||||
|
||||
Reference in New Issue
Block a user