summaryrefslogtreecommitdiffstats
path: root/apps/plugins/zxbox/archos.lds
blob: 319b9eb626d1841838c49aaedf9ed5b4db06f24f (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
#include "config.h"

/* linker script for chessbox as an overlay,
 * only used/ necessary for SH-based archos targets */

OUTPUT_FORMAT(elf32-sh)

#define DRAMORIG 0x09000000
#define PLUGIN_LENGTH PLUGIN_BUFFER_SIZE

#define OVERLAY_LENGTH 0x80000
#define OVERLAY_ORIGIN (DRAMORIG + (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH - OVERLAY_LENGTH)

MEMORY
{
   OVERLAY_RAM : ORIGIN = OVERLAY_ORIGIN, LENGTH = OVERLAY_LENGTH
}

SECTIONS
{
    .header : {
        _plugin_start_addr = .;
        *(.header)
    } > OVERLAY_RAM

    .text : {
        *(.text)
        *(.text.*)
    } > OVERLAY_RAM

    .rodata : {
        *(.rodata)
        *(.rodata.*)
    } > OVERLAY_RAM

    .data : {
        *(.data)
    } > OVERLAY_RAM

    .bss : {
        *(.bss)
        *(.bss.*)
        *(COMMON)
        . = ALIGN(0x4);
        _plugin_end_addr = .;
    } > OVERLAY_RAM
}