mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Align sections in linker script
This commit is contained in:
@@ -14,22 +14,28 @@ ENTRY(start)
|
|||||||
SECTIONS {
|
SECTIONS {
|
||||||
. = 1M;
|
. = 1M;
|
||||||
|
|
||||||
.boot :
|
.rodata : ALIGN(4K)
|
||||||
{
|
{
|
||||||
/* ensure that the multiboot header is at the beginning */
|
/* ensure that the multiboot header is at the beginning */
|
||||||
KEEP(*(.multiboot_header))
|
KEEP(*(.multiboot_header))
|
||||||
|
*(.rodata .rodata.*)
|
||||||
}
|
}
|
||||||
|
|
||||||
.text :
|
.text : ALIGN(4K)
|
||||||
{
|
{
|
||||||
*(.text .text.*)
|
*(.text .text.*)
|
||||||
}
|
}
|
||||||
|
|
||||||
.rodata : {
|
.data : ALIGN(4K)
|
||||||
*(.rodata .rodata.*)
|
{
|
||||||
|
*(.data .data.*)
|
||||||
}
|
}
|
||||||
|
|
||||||
.data.rel.ro : {
|
.data.rel.ro : ALIGN(4K) {
|
||||||
*(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*)
|
*(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gcc_except_table : ALIGN(4K) {
|
||||||
|
*(.gcc_except_table)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user