2015-08-09 00:42:56 +00:00
|
|
|
/* Bei _start soll die Ausfuehrung losgehen */
|
2015-08-13 15:23:11 +00:00
|
|
|
ENTRY(_trainOS_start)
|
|
|
|
OUTPUT_FORMAT(elf32-i386)
|
|
|
|
OUTPUT_ARCH(i386:i386)
|
2015-08-09 00:42:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Hier wird festgelegt, in welcher Reihenfolge welche Sektionen in die Binary
|
|
|
|
* geschrieben werden sollen
|
|
|
|
*/
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Startpunkt des Kernels
|
|
|
|
*/
|
|
|
|
. = 0x100000;
|
|
|
|
|
|
|
|
/* Kernel Start Punkt */
|
|
|
|
kernelStart = .;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Two text sections: .text and .multiboot
|
|
|
|
* Multiboot must be at the start of the kernel
|
|
|
|
*/
|
|
|
|
.text : {
|
|
|
|
*(multiboot)
|
|
|
|
*(.text)
|
|
|
|
}
|
|
|
|
.data ALIGN(4096) : {
|
2015-08-13 15:23:11 +00:00
|
|
|
start_ctors = .;
|
|
|
|
KEEP(*( .init_array ));
|
|
|
|
KEEP(*(SORT_BY_INIT_PRIORITY( .init_array.* )));
|
|
|
|
end_ctors = .;
|
|
|
|
|
2015-08-09 00:42:56 +00:00
|
|
|
*(.data)
|
|
|
|
}
|
|
|
|
.rodata ALIGN(4096) : {
|
|
|
|
*(.rodata)
|
|
|
|
}
|
|
|
|
.bss ALIGN(4096) : {
|
|
|
|
*(.bss)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Align the end of the kernel to the page size */
|
|
|
|
. = ALIGN(4096);
|
|
|
|
kernelEnd = .;
|
|
|
|
}
|