First commit
This commit is contained in:
45
ilm.ld
Normal file
45
ilm.ld
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* ld directives the for barmetal RISCV
|
||||
*/
|
||||
OUTPUT_ARCH( "riscv" )
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram (wxa) : ORIGIN = 0x80000000, LENGTH = 128M
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
/* The kernel starts at 0x80000000 */
|
||||
. = 0x80000000;
|
||||
.text : {
|
||||
ENTRY(entry)
|
||||
KEEP(*(.text.entry))
|
||||
|
||||
*(.text.init) *(.text) *(.text.*)
|
||||
_etext = .;
|
||||
} > ram
|
||||
|
||||
.data : {
|
||||
*(.sdata) *(.sdata.*)
|
||||
*(.fini)
|
||||
*(.anno)
|
||||
*(.rodata) *(.rodata.*)
|
||||
*(__ex_table)
|
||||
*(.data) *(.data.*)
|
||||
_edata = .;
|
||||
} > ram
|
||||
|
||||
.bss : {
|
||||
/* On veut un alignement sur 8 octets */
|
||||
. = ALIGN(8);
|
||||
__bss_start = .;
|
||||
*(.sbss) *(.sbss.*)
|
||||
*(.bss) *(.bss.*)
|
||||
*(scommon) *(COMMON)
|
||||
. = ALIGN(8);
|
||||
__bss_end = .;
|
||||
PROVIDE(_heap_start = __bss_end + 8);
|
||||
PROVIDE(_heap_end = ORIGIN(ram) + LENGTH(ram));
|
||||
} > ram
|
||||
_end = .;
|
||||
}
|
||||
Reference in New Issue
Block a user