rulimine/test/linker.ld

49 lines
894 B
Plaintext
Raw Normal View History

ENTRY(limine_main)
2020-03-25 01:39:02 +03:00
PHDRS
{
text PT_LOAD FLAGS((1 << 0) | (1 << 2)) ; /* Execute + Read */
rodata PT_LOAD FLAGS((1 << 2)) ; /* Read only */
data PT_LOAD FLAGS((1 << 1) | (1 << 2)) ; /* Write + Read */
dynamic PT_DYNAMIC FLAGS((1 << 1) | (1 << 2)) ; /* Dynamic segment needed for PIE */
}
SECTIONS
{
. = 0xffffffff80000000;
2022-03-18 01:46:48 +03:00
kernel_start = .;
.text : {
*(.text .text.*)
} :text
2020-03-25 01:39:02 +03:00
. += 0x1000;
2020-03-26 03:37:56 +03:00
.limine_reqs : {
KEEP(*(.limine_reqs))
QUAD(0)
} :rodata
.rodata : {
*(.rodata .rodata.*)
} :rodata
2020-03-25 01:39:02 +03:00
. += 0x1000;
.data : {
*(.data .data.*)
__global_pointer$ = . + 0x800;
*(.sdata .sdata.*)
} :data
.dynamic : {
*(.dynamic)
} :data :dynamic
.bss : {
*(COMMON)
*(.sbss .sbss.*)
*(.bss .bss.*)
} :data
2020-03-25 01:39:02 +03:00
}