mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 14:44:26 +02:00
2a73c3aeb4
interrupts with IRQ and syscalls, make phys_to_virt checked, recreate stack on aarch64, make serial console finally line wrap and have max height correctly, add U64Buf for when i need number debug, rename mouse and keyboard files to kmi and merge them, add non-working pl050 support
61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
/* Tell the linker that we want an aarch64 ELF64 output file */
|
|
OUTPUT_FORMAT(elf64-littleaarch64)
|
|
|
|
/* We want the symbol kmain to be our entry point */
|
|
ENTRY(kmain)
|
|
|
|
/* Define the program headers we want so the bootloader gives us the right */
|
|
/* MMU permissions; this also allows us to exert more control over the linking */
|
|
/* process. */
|
|
PHDRS
|
|
{
|
|
text PT_LOAD;
|
|
rodata PT_LOAD;
|
|
data PT_LOAD;
|
|
}
|
|
|
|
SECTIONS
|
|
{
|
|
/* We want to be placed in the topmost 2GiB of the address space, for optimisations */
|
|
/* and because that is what the Limine spec mandates. */
|
|
/* Any address in this region will do, but often 0xffffffff80000000 is chosen as */
|
|
/* that is the beginning of the region. */
|
|
. = 0xffffffff80000000;
|
|
|
|
__kernel_start = .;
|
|
|
|
__text_start = .;
|
|
.text : ALIGN(0x1000) {
|
|
*(.text.vectors)
|
|
*(.text .text.*)
|
|
} :text
|
|
|
|
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
|
__text_end = .;
|
|
|
|
__rodata_start = .;
|
|
.rodata : { *(.rodata .rodata.*) } :rodata
|
|
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
|
__rodata_end = .;
|
|
|
|
__data_start = .;
|
|
.data : {
|
|
*(.data .data.*)
|
|
KEEP(*(.requests_start_marker))
|
|
KEEP(*(.requests))
|
|
KEEP(*(.requests_end_marker))
|
|
} :data
|
|
.bss : {
|
|
*(.bss .bss.*)
|
|
*(COMMON)
|
|
} :data
|
|
__data_end = .;
|
|
__kernel_end = .;
|
|
|
|
/* Discard .note.* and .eh_frame* since they may cause issues on some hosts. */
|
|
/DISCARD/ : {
|
|
*(.eh_frame*)
|
|
*(.note .note.*)
|
|
}
|
|
}
|