started working on interrupts
[psx_test1] / psx.ld
1 ENTRY(_start)
2
3 MEMORY {
4         ram : ORIGIN = 0x80010000 - 0x800, LENGTH = 2M - 0x10000 + 0x800
5         dcache : ORIGIN = 0x1f800000, LENGTH = 0x400
6 }
7
8 _stacktop = ORIGIN(ram) + LENGTH(ram) - 16;
9 _dcache = ORIGIN(dcache);
10 _dcache_end = ORIGIN(dcache) + LENGTH(dcache);
11 _progsize = _imgend - _start;
12
13 SECTIONS {
14         /* put the exe header at the start, and pad it to 2k */
15         .exehdr : {
16                 * (.exehdr);
17                 . = ALIGN(0x800);
18         } >ram
19
20         .text : {
21                 /* the entry point should go first */
22                 * (.startup);
23                 * (.text*);
24         } >ram
25
26         .rodata : { * (.rodata*); } >ram
27         .data : { * (.data*); } >ram
28
29         _gp = ALIGN(16) + 0x7ff0;
30         .sdata : {
31                 * (.sdata*);
32         } >ram
33
34         .padding : {
35                 BYTE(0);
36                 . = ALIGN(0x800);
37         } >ram
38
39         _imgend = .;
40
41         .bss ALIGN(4) (NOLOAD) : {
42                 _bss_start = .;
43                 /* .sbss first to be reachable by _gp */
44                 * (.sbss*);
45                 * (.bss*);
46                 * (COMMON)
47                 . = ALIGN(4);
48                 _bss_end = .;
49         }
50
51         _end = .;
52
53         /DISCARD/ : {
54                 *(.note.GNU-stack);
55                 *(.comment);
56         }
57 }