Some static data is only used by .init functions. Add .initdata to declare such data (otherwise section conflicts arise). For i.MX31, use INITDATA_ATTR in the appropriate places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29008 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
17585a991c
commit
1b275d8ddb
5 changed files with 5 additions and 6 deletions
|
@ -835,9 +835,11 @@ Lyre prototype 1 */
|
||||||
* from crashes to freezes to exploding daps.
|
* from crashes to freezes to exploding daps.
|
||||||
*/
|
*/
|
||||||
#define INIT_ATTR __attribute__ ((section(".init")))
|
#define INIT_ATTR __attribute__ ((section(".init")))
|
||||||
|
#define INITDATA_ATTR __attribute__ ((section(".initdata")))
|
||||||
#define HAVE_INIT_ATTR
|
#define HAVE_INIT_ATTR
|
||||||
#else
|
#else
|
||||||
#define INIT_ATTR
|
#define INIT_ATTR
|
||||||
|
#define INITDATA_ATTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
|
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
|
||||||
|
|
|
@ -111,7 +111,7 @@ SECTIONS
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
_initstart = .;
|
_initstart = .;
|
||||||
*(.init)
|
*(.init)
|
||||||
*(.sdmacode)
|
*(.initdata)
|
||||||
_initend = .;
|
_initend = .;
|
||||||
} > INIT AT> DRAM
|
} > INIT AT> DRAM
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,6 @@ SECTIONS
|
||||||
*(.irodata)
|
*(.irodata)
|
||||||
*(.idata)
|
*(.idata)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
. = ALIGN(0x4);
|
|
||||||
*(.sdmacode)
|
|
||||||
. = ALIGN(0x4);
|
|
||||||
_dataend = . ;
|
_dataend = . ;
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ void system_exception_wait(void)
|
||||||
|
|
||||||
void INIT_ATTR system_init(void)
|
void INIT_ATTR system_init(void)
|
||||||
{
|
{
|
||||||
static const int disable_clocks[] =
|
static const enum IMX31_CG_LIST disable_clocks[] INITDATA_ATTR =
|
||||||
{
|
{
|
||||||
/* CGR0 */
|
/* CGR0 */
|
||||||
CG_SD_MMC1,
|
CG_SD_MMC1,
|
||||||
|
|
|
@ -294,7 +294,7 @@
|
||||||
/*!
|
/*!
|
||||||
* Code download
|
* Code download
|
||||||
*/
|
*/
|
||||||
static __attribute__((aligned(4), section(".sdmacode")))
|
static __attribute__((aligned(4))) INITDATA_ATTR
|
||||||
const short sdma_code_2[RAM_CODE_SIZE_2] =
|
const short sdma_code_2[RAM_CODE_SIZE_2] =
|
||||||
{
|
{
|
||||||
0x0870, 0x0011, 0x5010, 0xc0ec, 0x7d61, 0x5ac0, 0x5bc8, 0x5ef8,
|
0x0870, 0x0011, 0x5010, 0xc0ec, 0x7d61, 0x5ac0, 0x5bc8, 0x5ef8,
|
||||||
|
|
Loading…
Reference in a new issue