Prepare for supporting LBAs in persitent code
This commit is contained in:
19
lib/psexe.ld
19
lib/psexe.ld
@@ -44,9 +44,10 @@ __sp = __ram_top - 0x100;
|
||||
__dcache = ORIGIN(dcache);
|
||||
__dcache_top = ORIGIN(dcache) + LENGTH(dcache);
|
||||
|
||||
__bss_len = (__bss_end - __bss_start);
|
||||
__ftext_len = (__ftext_end - __ftext_start);
|
||||
__fdata_len = (__planschi_end - __fdata_start);
|
||||
__bss_len = (__bss_end - __bss_start);
|
||||
__ftext_len = (__ftext_end - __ftext_start);
|
||||
__fdata_len = (__planschi_end - __fdata_start);
|
||||
__persistent_lbas_len = (__persistent_lbas_end - __persistent_lbas_start);
|
||||
|
||||
__stack_start = ORIGIN(ram) + LENGTH(ram);
|
||||
|
||||
@@ -120,7 +121,7 @@ SECTIONS {
|
||||
LONG(TLOAD_ADDR);
|
||||
|
||||
/* 0x001C - 0x001F : size, in bytes, of the "text" section. */
|
||||
LONG(__ftext_len + __fdata_len);
|
||||
LONG(__persistent_lbas_len + __ftext_len + __fdata_len);
|
||||
|
||||
/* 0x0020 - 0x002F :
|
||||
Skip "data_addr", "data_size", "bss_addr" and "bss_size".
|
||||
@@ -140,8 +141,16 @@ SECTIONS {
|
||||
. = . + 1992;
|
||||
} > loader
|
||||
|
||||
__persistent_lbas_start = ABSOLUTE(.);
|
||||
.persistent_lbas TLOAD_ADDR : {
|
||||
__persistent_lbas = .;
|
||||
KEEP(*(.header.lbas))
|
||||
} > ram
|
||||
. = ALIGN(4);
|
||||
__persistent_lbas_end = ABSOLUTE(.);
|
||||
|
||||
__ftext_start = ABSOLUTE(.);
|
||||
.text TLOAD_ADDR : {
|
||||
.text : {
|
||||
*(.start)
|
||||
*(.init)
|
||||
KEEP (*(SORT_NONE(.fini)))
|
||||
|
||||
Reference in New Issue
Block a user