x86: forgot data section in linker script
This commit is contained in:
parent
27c516b896
commit
70b970e275
1 changed files with 12 additions and 10 deletions
|
@ -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 = . ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue