diff --git a/examples/arch-riscv64-min/linker.ld b/examples/arch-riscv64-min/linker.ld index 37c8724..f4da9c1 100644 --- a/examples/arch-riscv64-min/linker.ld +++ b/examples/arch-riscv64-min/linker.ld @@ -1,14 +1,27 @@ ENTRY(_start); -. = 0x80000000; +SECTIONS +{ + . = 0x80000000; -SECTIONS { - /* Include entry point at start of binary */ - .text : ALIGN(4K) { + .text : ALIGN(4K) + { *(.init); *(.text); } - .bss : ALIGN(4K) { + + .rodata : ALIGN(4K) + { + *(.rodata); + } + + .data : ALIGN(4K) + { + *(.data); + } + + .bss : ALIGN(4K) + { PROVIDE(bss_start = .); *(.bss); . += 4096; @@ -17,10 +30,4 @@ SECTIONS { PROVIDE(global_pointer = .); PROVIDE(bss_end = .); } - .rodata : ALIGN(4K) { - *(.rodata); - } - .data : ALIGN(4K) { - *(.data); - } } diff --git a/examples/bootloader-multiboot2-grub/linker.ld b/examples/bootloader-multiboot2-grub/linker.ld index 9de8dc6..b75a316 100644 --- a/examples/bootloader-multiboot2-grub/linker.ld +++ b/examples/bootloader-multiboot2-grub/linker.ld @@ -14,24 +14,24 @@ SECTIONS .text BLOCK(4K) : ALIGN(4K) { - *(.multiboot2) - *(.text) + *(.multiboot2); + *(.text); } .rodata BLOCK(4K) : ALIGN(4K) { - *(.rodata) + *(.rodata); } .data BLOCK(4K) : ALIGN(4K) { - *(.data) + *(.data); } .bss BLOCK(4K) : ALIGN(4K) { - *(COMMON) - *(.bss) + *(COMMON); + *(.bss); } _kernel_size = . - _kernel_phys_base; diff --git a/examples/bootloader-multiboot2-limine/linker.ld b/examples/bootloader-multiboot2-limine/linker.ld index 9de8dc6..b75a316 100644 --- a/examples/bootloader-multiboot2-limine/linker.ld +++ b/examples/bootloader-multiboot2-limine/linker.ld @@ -14,24 +14,24 @@ SECTIONS .text BLOCK(4K) : ALIGN(4K) { - *(.multiboot2) - *(.text) + *(.multiboot2); + *(.text); } .rodata BLOCK(4K) : ALIGN(4K) { - *(.rodata) + *(.rodata); } .data BLOCK(4K) : ALIGN(4K) { - *(.data) + *(.data); } .bss BLOCK(4K) : ALIGN(4K) { - *(COMMON) - *(.bss) + *(COMMON); + *(.bss); } _kernel_size = . - _kernel_phys_base;