peredOS/linker.ld
2026-07-01 18:42:51 +03:00

33 lines
853 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ENTRY(_start)
SECTIONS
{
/* Начинаем загрузку с 1 Мегабайта (стандарт для ядер) */
. = 1M;
/* Секция кода */
.text BLOCK(4K) : ALIGN(4K)
{
*(.multiboot) /* Заголовок для GRUB — строго на самом старте */
*(.text)
}
/* Секция данных только для чтения (строки, константы) */
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
/* Секция инициализированных глобальных переменных */
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
/* Секция неинициализированных переменных и стек */
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
}
}