Move data objects at the end of flash.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
2017-04-27 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/gnuk.ld.in (_data_pool): Move to the end.
|
||||
|
||||
* src/flash.c (flash_init): Return address of end of data object.
|
||||
* src/openpgp.c (gpg_init): Get address of end of data object.
|
||||
* src/openpgp-do.c (gpg_data_scan): Check the end address.
|
||||
|
||||
@@ -171,10 +171,6 @@ SECTIONS
|
||||
.gnuk_flash :
|
||||
{
|
||||
. = ALIGN (@FLASH_PAGE_SIZE@);
|
||||
_data_pool = .;
|
||||
KEEP(*(.gnuk_data))
|
||||
. = ALIGN(@FLASH_PAGE_SIZE@);
|
||||
. += @FLASH_PAGE_SIZE@;
|
||||
_keystore_pool = .;
|
||||
. += 512;
|
||||
. = ALIGN(@FLASH_PAGE_SIZE@);
|
||||
@@ -185,6 +181,10 @@ SECTIONS
|
||||
_updatekey_store = .;
|
||||
. += 1024;
|
||||
. = ALIGN(@FLASH_PAGE_SIZE@);
|
||||
_data_pool = .;
|
||||
KEEP(*(.gnuk_data))
|
||||
. = ALIGN(@FLASH_PAGE_SIZE@);
|
||||
. += @FLASH_PAGE_SIZE@;
|
||||
} > flash =0xffffffff
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user