diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-26 15:37:37 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-26 15:37:37 +0100 |
| commit | 0476248f648ccddea9bdf9bae9095c3231e6643d (patch) | |
| tree | 61280ff1ad93b384a9697c0ee9d60854e12e58e9 /Linker | |
| parent | ae89bf9564c59ea3aee10f175d473e562af793f8 (diff) | |
Kernel: Retarget AMD64 according to spec.
Kernel/Toolchain: Now move hKernel to /System/ when building the system.
MPT: Fix API.
newBoot: This is the priority, get a standard file layout to load the
kernel at BK_START_KERNEL (0x00080000)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Linker')
| -rw-r--r-- | Linker/AMD64.ld | 44 | ||||
| -rw-r--r-- | Linker/PowerPC.ld | 21 |
2 files changed, 44 insertions, 21 deletions
diff --git a/Linker/AMD64.ld b/Linker/AMD64.ld new file mode 100644 index 00000000..0b083ca0 --- /dev/null +++ b/Linker/AMD64.ld @@ -0,0 +1,44 @@ +OUTPUT_FORMAT("elf64-x86-64") + +ENTRY(Main) + +PHDRS { + null PT_NULL FLAGS(0) ; + text PT_LOAD FLAGS((1 << 0) | (1 << 2) | (1 << 3)); + rodata PT_LOAD FLAGS((1 << 2)) ; + data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; +} + +SECTIONS { + . = 0x00080000; + + .text : { + KEEP(*(.multiboot)) + *(.text .text.*) + } :text + + . += CONSTANT(MAXPAGESIZE); + + .init : { + *(.initl) + } + + . += CONSTANT(MAXPAGESIZE); + + .rodata : { + *(.rodata .rodata.*) + } :rodata + + . += CONSTANT(MAXPAGESIZE); + + .data : { + *(.data .data.*) + } :data + + . += CONSTANT(MAXPAGESIZE); + + .bss : { + *(COMMON) + *(.bss .bss.*) + } :data +}
\ No newline at end of file diff --git a/Linker/PowerPC.ld b/Linker/PowerPC.ld deleted file mode 100644 index 722a86b8..00000000 --- a/Linker/PowerPC.ld +++ /dev/null @@ -1,21 +0,0 @@ -ENTRY(_start) - -SECTIONS -{ - . = 0x02000000; - .text BLOCK(4K) : ALIGN(4K) - { - *(.text) - } - . = 0x02100000; - .data BLOCK(4K) : ALIGN(4K) - { - - *(.rodata) - *(.data) - } - .bss BLOCK(4K) (NOLOAD) : ALIGN(4K) - { - *(.bss) - } -}
\ No newline at end of file |
