rockbox/utils/hwstub/stub/jz4760b/hwstub.lds
Amaury Pouly cc2389b7a6 hwstub: add jz4760b stub
The stub is quite versatile: it can be loaded using bootrom or another other
means (like factory boot on Fiio X1). It relocates itself to TCSM0 and provides
basic functionality (it does not recover from failed read/writes at the moment).

Change-Id: Ib646a4b43fba9358d6f93f0f73a5c2e9bcd775a7
2017-01-24 15:22:27 +01:00

55 lines
927 B
Text

#include "config.h"
ENTRY(main)
OUTPUT_ARCH(mips)
STARTUP(jz4760b/crt0.o)
MEMORY
{
/* see crt0.S from an an explanation of why TCSM0 is the best choice */
TCSM0 : ORIGIN = TCSM0_ORIG, LENGTH = TCSM0_SIZE
}
SECTIONS
{
.itext :
{
relocstart = .;
oc_codestart = .;
*(.init.text*)
*(.text*)
*(.icode*)
*(.data*)
*(.rodata*)
. = ALIGN(4);
relocend = .;
} > TCSM0
.bss (NOLOAD) :
{
bssbegin = .;
*(.bss)
. = ALIGN(4);
bssend = .;
} > TCSM0
.stack (NOLOAD) :
{
oc_codeend = .;
oc_stackstart = .;
. += STACK_SIZE;
oc_stackend = .;
oc_bufferstart = .;
} > TCSM0
.ocend TCSM0_ORIG + TCSM0_SIZE (NOLOAD) :
{
oc_bufferend = .;
} > TCSM0
/DISCARD/ :
{
*(.note.*)
*(.reginfo*)
*(.MIPS*)
}
}