same routines in multiple overlays
Oliver Wohlmuth
oliver.wohlmuth@freescale.com
Wed Feb 1 08:06:00 GMT 2006
Hello,
I'm using overlays to load time critical routines from external memory into on-chip memory.
Depending on what "codec" is used, the appropriate overlay is loaded. This works fine so far.
The problem is, that some routines are shared between different overlay (i.e. codecs). So far
I defined a non-overlay area in on-chip memory to hold this common time critical routines.
But not all common code is needed by all codecs; so I'm not utilizing the on-chip memory
the most efficient way. Actually I'm running out of on-chip memory!
Here comes my question:
Is there a way in the linker script to tell ld (version 2.16.1) to move a static
library into multiple overlays ? If not, does anybody know of other way to achieve
this ?
Regards,
Oliver
Here is a snippet from the actual linker script (IRAM1 holds the overlays
for the different codecs and IRAM2 holds the common code):
/*
* Code which is mapped to internal instruction memory
*/
IRAM1 : {
_iram_overlay_put = .;
*(.startup_text)
} > iram :seg_iram
OVERLAY _iram_overlay_put : NOCROSSREFS AT (_iram_overlay_load) {
a_code {
*(.a_text)
. = ALIGN(4) ;
}
b_code {
*(.b_text)
. = ALIGN(4) ;
}
c_code {
*(.c_text)
. = ALIGN(4) ;
}
d_code {
*(.d_text)
. = ALIGN(4) ;
}
e_code {
*(.e_text)
. = ALIGN(4) ;
}
} > iram :seg_iextram
IRAM2 : {
*(.itext)
} > iram :seg_iram
More information about the Binutils
mailing list