Merge branch 'gsoc-android-2' of git+ssh://repo.or.cz/srv/git/kugel-rb into gsoc...
[kugel-rb.git] / gdb / linker.cfg
blobaf604e03791bfebc3d789c268945b0ca6a609a65
1 #include "config.h"
3 #ifdef CPU_ARM
4 ENTRY(start)
5 STARTUP(crt0.o)
6 OUTPUT_FORMAT(elf32-littlearm)
7 #else
8 ENTRY(_start)
9 OUTPUT_FORMAT(elf32-sh)
10 #endif
12 #ifdef IRIVER_IFP7XX_SERIES
13 MEMORY
15    IRAM : ORIGIN = 0, LENGTH = 0x10000
16    DRAM : ORIGIN = 0xc00000, LENGTH = 0x6000
17    DRAM_API : ORIGIN = 0xc06000, LENGTH = 0x100
20 SECTIONS
22     .text :
23     {
24         *(.init*)
25         *(.text)
26         *(.text*)
27         *(.rodata)
28         *(.rodata*)
29         *(.glue_7)
30         *(.glue_7t)
31     } >DRAM
33     .gdbapi :
34     {
35         *(.gdbapi)
36     } >DRAM_API
38     .data :
39     {
40         *(.data)
41     } >DRAM
43     .vectors :
44     {
45         _vectorsstart = .;
46         *(.vectors)
47         _vectorsend = .;
48     } >IRAM AT>DRAM
49     _vectorscopy = LOADADDR(.vectors);
51     .stack (NOLOAD) :
52     {
53         stackbegin = .;
54         . += 0x400;
55         _stub_stack = .;
56         . += 0x200;
57         stackend = .;
58     } >DRAM
60     .bss (NOLOAD) :
61     {
62         _edata = .;
63         *(.bss)
64         _end = .;
65     } >DRAM
67 #else
69 SECTIONS
71     .vectors 0x09000000 :
72     {
73         *(.vectors);
74         . = ALIGN(0x200);
75         start.o(.text)
76         *(.rodata)
77     }
79     .text :
80     {
81         *(.text)
82     }
84     .bss :
85     {
86        _stack = . + 0x1000;
87        _stub_stack = _stack + 0x1000;
88     }
90     .pad 0x0900C800 :
91     {
92         LONG(0);
93     }
96 #endif