x86: forgot data section in linker script

This commit is contained in:
anna 2021-09-19 04:46:35 +02:00
parent 27c516b896
commit 70b970e275
Signed by: fef
GPG key ID: EC22E476DC2D3D84

View file

@ -15,33 +15,35 @@ SECTIONS {
_image_start = .; _image_start = .;
_kernel_start = .; _kernel_start = .;
.text : { .text BLOCK(4K) : ALIGN(4K) {
. = ALIGN(8);
_text_start = .; _text_start = .;
/* /*
* This is where the multiboot header is stored which grub2 * This is where the multiboot header is stored which grub2
* or any other compliant bootloader picks up, don't move away * or any other compliant bootloader picks up, don't move away
*/ */
KEEP(*(.multiboot)) KEEP(*(.multiboot))
KEEP(*(.text .text.*)) *(.text .text.* .gnu.linkonce.t.*)
_text_end = .; _text_end = .;
} }
.rodata : { .rodata BLOCK(4K) : ALIGN(4K) {
. = ALIGN(8);
_rodata_start = .; _rodata_start = .;
*(.rodata .rodata.*) *(.rodata .rodata.* .gnu.linkonce.r.*)
_rodata_end = .; _rodata_end = .;
} }
.data BLOCK(4K) : ALIGN(4K) {
_data_start = .;
*(.data .data.*)
_data_end = .;
}
_kernel_end = .; _kernel_end = .;
.bss(NOLOAD) : { .bss BLOCK(4K) : ALIGN(4K) {
. = ALIGN(8);
_bss_start = . ; _bss_start = . ;
*(.bss .bss.*)
*(COMMON) *(COMMON)
. = ALIGN(8); *(.bss .bss.*)
_bss_end = . ; _bss_end = . ;
} }