summaryrefslogtreecommitdiff
path: root/utils/hwstub/stub/jz4760b/hwstub.lds
blob: 33aad51ebdc140cce7a2d9e1dab872102840f8d1 (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
#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*)
    }
}