summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_x1000/spl.lds
blob: e932bd9c2e41123b5b8233c439e5e1582e7ddc5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "config.h"
#include "cpu.h"

OUTPUT_FORMAT("elf32-littlemips")
OUTPUT_ARCH(MIPS)
ENTRY(_spl_start)
STARTUP(target/mips/ingenic_x1000/spl-start.o)

MEMORY {
    /* First 4k of TCSM is used by mask ROM for stack + variables,
     * and the next 2k are occupied by SPL header */
    TCSM : ORIGIN = X1000_TCSM_BASE + 0x1800,
           LENGTH = X1000_TCSM_SIZE - 0x1800
}

SECTIONS
{
    /* Mask ROM variables, addresses found by disassembly */
    boot_sel = X1000_TCSM_BASE + 0x1ec;

    .text :
    {
        *(.init.spl);
        *(.text*);
        *(.icode*);
    } > TCSM

    . = ALIGN(4);
    .rodata :
    {
        *(.rodata*);
    } > TCSM

    . = ALIGN(4);
    .data :
    {
        *(.data*);
        *(.sdata*);
    } > TCSM

    . = ALIGN(4);
    .bss (NOLOAD) :
    {
        _bssbegin = .;
        *(.sbss*);
        *(.bss*);
        *(COMMON);
        *(.scommon*);
        _bssend = .;
    } > TCSM

    /DISCARD/ :
    {
        *(.MIPS.abiflags);
        *(.eh_frame);
        *(.rel.dyn);
    }
}