Line 51... |
Line 51... |
/* Make sure this is sync with your processor/ */
|
/* Make sure this is sync with your processor/ */
|
/* memory hardware configuration. */
|
/* memory hardware configuration. */
|
/* ************************************************* */
|
/* ************************************************* */
|
MEMORY
|
MEMORY
|
{
|
{
|
rom (rx) : ORIGIN = 0x00000000, LENGTH = 16*1024
|
/* rom section: first value of ORIGIN/LENGHT: bootloader ROM; second value of ORIGIN/LENGHT: IMEM */
|
|
rom (rx) : ORIGIN = DEFINED(make_bootloader) ? 0xFFFF0000 : 0x00000000, LENGTH = DEFINED(make_bootloader) ? 4*1024 : 16*1024
|
ram (rwx) : ORIGIN = 0x80000000, LENGTH = 8*1024
|
ram (rwx) : ORIGIN = 0x80000000, LENGTH = 8*1024
|
}
|
}
|
/* ************************************************* */
|
/* ************************************************* */
|
|
|
SECTIONS
|
SECTIONS
|
Line 93... |
Line 94... |
.text :
|
.text :
|
{
|
{
|
PROVIDE(__text_start = .);
|
PROVIDE(__text_start = .);
|
PROVIDE(__textstart = .);
|
PROVIDE(__textstart = .);
|
|
|
|
|
|
|
PROVIDE_HIDDEN (__rela_iplt_start = .);
|
PROVIDE_HIDDEN (__rela_iplt_start = .);
|
*(.rela.iplt)
|
*(.rela.iplt)
|
PROVIDE_HIDDEN (__rela_iplt_end = .);
|
PROVIDE_HIDDEN (__rela_iplt_end = .);
|
|
|
*(.rela.plt)
|
*(.rela.plt)
|
|
|
KEEP(*(.text.boot)); /* keep start-up code */
|
KEEP(*(.text.boot)); /* keep start-up code at the beginning of rom */
|
|
|
KEEP (*(SORT_NONE(.init)))
|
KEEP (*(SORT_NONE(.init)))
|
|
|
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
|
*(.text.unlikely .text.*_unlikely .text.unlikely.*)
|
*(.text.exit .text.exit.*)
|
*(.text.exit .text.exit.*)
|
Line 170... |
Line 169... |
/* finish section on WORD boundary */
|
/* finish section on WORD boundary */
|
. = ALIGN(4);
|
. = ALIGN(4);
|
} > rom
|
} > rom
|
|
|
|
|
|
|
/* initialized read/write data, accessed in RAM, placed in ROM, copied during boot */
|
/* initialized read/write data, accessed in RAM, placed in ROM, copied during boot */
|
.jcr : { KEEP (*(.jcr)) }
|
.jcr : { KEEP (*(.jcr)) }
|
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
|
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
|
.dynamic : { *(.dynamic) }
|
.dynamic : { *(.dynamic) }
|
.data1 : { *(.data1) }
|
.data1 : { *(.data1) }
|
Line 186... |
Line 184... |
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
|
|
*(.data .data.* .gnu.linkonce.d.*)
|
*(.data .data.* .gnu.linkonce.d.*)
|
SORT(CONSTRUCTORS)
|
SORT(CONSTRUCTORS)
|
|
|
|
|
/* We want the small data sections together, so single-instruction offsets
|
/* We want the small data sections together, so single-instruction offsets
|
can access them all, and initialized data all before uninitialized, so
|
can access them all, and initialized data all before uninitialized, so
|
we can shorten the on-disk segment size. */
|
we can shorten the on-disk segment size. */
|
|
|
*(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)
|
*(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)
|
Line 207... |
Line 204... |
. = .;
|
. = .;
|
|
|
} > ram AT > rom
|
} > ram AT > rom
|
|
|
|
|
|
|
/* zero/non-initialized read/write data placed in RAM */
|
/* zero/non-initialized read/write data placed in RAM */
|
.sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
|
.sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
|
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
.bss (NOLOAD):
|
.bss (NOLOAD):
|
{
|
{
|
Line 221... |
Line 217... |
*(.scommon)
|
*(.scommon)
|
|
|
*(.dynbss)
|
*(.dynbss)
|
*(.bss .bss.* .gnu.linkonce.b.*)
|
*(.bss .bss.* .gnu.linkonce.b.*)
|
|
|
|
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
KEEP (*(.preinit_array))
|
KEEP (*(.preinit_array))
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
|
|
*(COMMON)
|
*(COMMON)
|
Line 242... |
Line 237... |
MAX(__DATA_BEGIN__ + 0x800, __BSS_END__ - 0x800));
|
MAX(__DATA_BEGIN__ + 0x800, __BSS_END__ - 0x800));
|
_end = .; PROVIDE (end = .);
|
_end = .; PROVIDE (end = .);
|
} > ram
|
} > ram
|
|
|
|
|
|
|
/* Stabs debugging sections. */
|
/* Stabs debugging sections. */
|
.stab 0 : { *(.stab) }
|
.stab 0 : { *(.stab) }
|
.stabstr 0 : { *(.stabstr) }
|
.stabstr 0 : { *(.stabstr) }
|
.stab.excl 0 : { *(.stab.excl) }
|
.stab.excl 0 : { *(.stab.excl) }
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
Line 287... |
Line 281... |
.debug_addr 0 : { *(.debug_addr) }
|
.debug_addr 0 : { *(.debug_addr) }
|
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
|
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
|
|
|
|
|
|
|
/* Provide further symbols for neorv32 crt0.elf */
|
/* Provide further symbols for neorv32 crt0.elf */
|
PROVIDE(__crt0_bss_start = __bss_start);
|
PROVIDE(__crt0_bss_start = __bss_start);
|
PROVIDE(__crt0_bss_end = __BSS_END__);
|
PROVIDE(__crt0_bss_end = __BSS_END__);
|
PROVIDE(__crt0_copy_data_src_begin = __etext + SIZEOF(.rodata));
|
PROVIDE(__crt0_copy_data_src_begin = __etext + SIZEOF(.rodata));
|
PROVIDE(__crt0_copy_data_dst_begin = __DATA_BEGIN__);
|
PROVIDE(__crt0_copy_data_dst_begin = __DATA_BEGIN__);
|