mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Autogenerating the break_virtual symbol
This commit is contained in:
@@ -10,7 +10,6 @@ from os.path import join
|
||||
Import('env')
|
||||
|
||||
src = Glob('*.[cS]')
|
||||
|
||||
objs = env.Object(src)
|
||||
|
||||
Return('objs')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Linker script that packs all containers in loader image.
|
||||
* Loader linker script that contains kernel and container images
|
||||
*
|
||||
* Copyright (C) 2007-2009 B Labs Ltd.
|
||||
* Copyright (C) 2008-2009 B Labs Ltd.
|
||||
*/
|
||||
ENTRY(_start)
|
||||
|
||||
@@ -13,17 +13,15 @@ SECTIONS
|
||||
.rodata1 : { *(.rodata1) }
|
||||
.data :
|
||||
{
|
||||
*(.data)
|
||||
*(.data)
|
||||
_start_kernel = .;
|
||||
*(.kernel)
|
||||
_end_kernel = .;
|
||||
|
||||
_start_containers = .;
|
||||
*(.containers)
|
||||
_end_containers = .;
|
||||
}
|
||||
_start_containers = .;
|
||||
|
||||
.cont.0 : { *(.cont.0) }
|
||||
.cont.1 : { *(.cont.1) }
|
||||
|
||||
_end_containers = .;
|
||||
.got : { *(.got) *(.got.plt) }
|
||||
.bss : { *(.bss) }
|
||||
}
|
||||
|
||||
@@ -6,19 +6,22 @@
|
||||
/* These symbols are defined by the linker script. */
|
||||
extern char _start_kernel[];
|
||||
extern char _end_kernel[];
|
||||
extern char _start_containers[];
|
||||
extern char _end_containers[];
|
||||
|
||||
/* This is a kernel symbol exported to loader's linker script from kernel build */
|
||||
extern char bkpt_phys_to_virt[];
|
||||
|
||||
/*
|
||||
void load_container_images(unsigned long start, unsigned long end)
|
||||
{
|
||||
struct elf_image *elf_img = (struct elf_image *)start;
|
||||
int nsect_headers;
|
||||
|
||||
// Find all section headers
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
void *kernel_entry = 0;
|
||||
@@ -28,10 +31,10 @@ int main(void)
|
||||
printf("ELF Loader: Started.\n");
|
||||
|
||||
printf("Loading the kernel...\n");
|
||||
load_elf_image(&kernel_entry, _start_kernel, _end_kernel);
|
||||
// load_elf_image(&kernel_entry, _start_kernel, _end_kernel);
|
||||
|
||||
printf("Loading containers...\n");
|
||||
load_container_images(_start_containers, _end_containers)
|
||||
// load_container_images(_start_containers, _end_containers)
|
||||
|
||||
printf("elf-loader:\tkernel entry point is %p\n", kernel_entry);
|
||||
// arch_start_kernel(kernel_entry);
|
||||
|
||||
Reference in New Issue
Block a user