Espresso 0.0.2a
This commit is contained in:
25
linker.ld
25
linker.ld
@ -18,33 +18,43 @@ SECTIONS
|
||||
work around this issue. This does not use that feature, so 2M was
|
||||
chosen as a safer option than the traditional 1M. */
|
||||
. = 2M;
|
||||
|
||||
__kernel_start = .;
|
||||
|
||||
/* First put the multiboot header, as it is required to be put very early
|
||||
in the image or the bootloader won't recognize the file format.
|
||||
Next we'll put the .text section. */
|
||||
.text BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
__kernel_text_start = .;
|
||||
KEEP(*(.multiboot))
|
||||
*(.text)
|
||||
__kernel_text_end = .;
|
||||
}
|
||||
|
||||
/* Read-only data. */
|
||||
.rodata BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
__kernel_rodata_start = .;
|
||||
*(.rodata)
|
||||
__kernel_rodata_end = .;
|
||||
}
|
||||
|
||||
/* Read-write data (initialized) */
|
||||
.data BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
__kernel_data_start = .;
|
||||
*(.data)
|
||||
__kernel_data_end = .;
|
||||
}
|
||||
|
||||
/* Read-write data (uninitialized) and stack */
|
||||
/* Read-write data (uninitialized) */
|
||||
.bss BLOCK(4K) : ALIGN(4K)
|
||||
{
|
||||
__bss_start = .;
|
||||
*(COMMON)
|
||||
*(.bss)
|
||||
__bss_end = .;
|
||||
}
|
||||
|
||||
/* Include the list of initialization functions sorted. */
|
||||
@ -64,8 +74,21 @@ SECTIONS
|
||||
KEEP (*(EXCLUDE_FILE(crti.o crtn.o) .fini_array))
|
||||
crtn.o(.fini_array)
|
||||
}
|
||||
|
||||
.pmm_bitmap (NOLOAD) : ALIGN(4K)
|
||||
{
|
||||
KEEP(*(.pmm_bitmap))
|
||||
}
|
||||
|
||||
.stack : ALIGN(16)
|
||||
{
|
||||
*(.stack)
|
||||
}
|
||||
|
||||
|
||||
/* The compiler may produce other sections, by default it will put them in
|
||||
a segment with the same name. Simply add stuff here as needed. */
|
||||
|
||||
__kernel_end = .;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user