forked from len0rd/rockbox
FS#10756 - Free unused init code
Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back. Only implemented for PP and as3525 so far. More targets could be added, as well as more functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e479853f15
commit
f8edc32589
33 changed files with 98 additions and 37 deletions
|
|
@ -127,7 +127,7 @@ static void init(void);
|
|||
#ifdef SIMULATOR
|
||||
void app_main(void)
|
||||
#else
|
||||
int main(void) __attribute__((noreturn));
|
||||
int main(void) INIT_ATTR __attribute__((noreturn));
|
||||
int main(void)
|
||||
#endif
|
||||
{
|
||||
|
|
@ -164,6 +164,7 @@ int main(void)
|
|||
root_menu();
|
||||
}
|
||||
|
||||
static int init_dircache(bool preinit) INIT_ATTR;
|
||||
static int init_dircache(bool preinit)
|
||||
{
|
||||
#ifdef HAVE_DIRCACHE
|
||||
|
|
@ -239,6 +240,7 @@ static int init_dircache(bool preinit)
|
|||
}
|
||||
|
||||
#ifdef HAVE_TAGCACHE
|
||||
static void init_tagcache(void) INIT_ATTR;
|
||||
static void init_tagcache(void)
|
||||
{
|
||||
bool clear = false;
|
||||
|
|
@ -372,6 +374,7 @@ static void init(void)
|
|||
|
||||
#else
|
||||
|
||||
static void init(void) INIT_ATTR;
|
||||
static void init(void)
|
||||
{
|
||||
int rc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue