mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
jz47xx: Add support for INIT region
Change-Id: I100cd661e9b1225167463542800c6aafbc3c17b3
This commit is contained in:
parent
fe16ab33dd
commit
641e91aa2f
5 changed files with 41 additions and 8 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#include "config.h"
|
||||
#define __ASSEMBLY__
|
||||
#include "cpu.h"
|
||||
|
||||
OUTPUT_FORMAT("elf32-littlemips")
|
||||
OUTPUT_ARCH(MIPS)
|
||||
|
|
@ -20,10 +22,15 @@ INPUT(target/mips/system-mips.o)
|
|||
/* Where the codec buffer ends, and the plugin buffer starts */
|
||||
#define ENDCODECADDR (ENDAUDIOADDR + CODEC_SIZE)
|
||||
|
||||
/* Place init code in the codec buffer */
|
||||
#define INITBASE ENDAUDIOADDR
|
||||
#define INITSIZE CODEC_SIZE
|
||||
|
||||
MEMORY
|
||||
{
|
||||
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||
INIT : ORIGIN = INITBASE, LENGTH = INITSIZE
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
|
|
@ -40,6 +47,9 @@ SECTIONS
|
|||
.text :
|
||||
{
|
||||
*(.text*);
|
||||
#ifndef HAVE_INIT_ATTR
|
||||
*(.init*);
|
||||
#endif
|
||||
} > DRAM
|
||||
|
||||
. = ALIGN(4);
|
||||
|
|
@ -81,6 +91,16 @@ SECTIONS
|
|||
} > IRAM
|
||||
_iramcopy = LOADADDR(.iram);
|
||||
|
||||
#ifdef HAVE_INIT_ATTR
|
||||
.init :
|
||||
{
|
||||
_initstart = .;
|
||||
*(.init*);
|
||||
_initend = .;
|
||||
} > INIT AT> DRAM
|
||||
_initcopy = LOADADDR(.init);
|
||||
#endif
|
||||
|
||||
. = ALIGN(4);
|
||||
|
||||
.stack (NOLOAD):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue