1 # linker config to produce simple NEC PC-Engine cartridge (.pce)
4 __STACKSIZE__: type = weak, value = $0300; # 3 pages stack
8 # FIXME: is this correct? the first 3? bytes cant be used?
9 ZP: file = "", start = $0003, size = $00FD, type = rw, define = yes;
11 # reset-bank and hardware vectors
12 ROM0: file = %O, start = $E000, size = $1FF6, fill = yes, define = yes;
13 ROMV: file = %O, start = $FFF6, size = $000A, fill = yes;
15 # first RAM page (also contains stack and zeropage)
16 RAM: file = "", start = $2200, size = $1e00, define = yes;
20 ZEROPAGE: load = ZP, type = zp, define = yes;
21 EXTZP: load = ZP, type = zp, define = yes, optional = yes;
22 APPZP: load = ZP, type = zp, define = yes, optional = yes;
23 STARTUP: load = ROM0, type = ro, define = yes;
24 ONCE: load = ROM0, type = ro, optional = yes;
25 CODE: load = ROM0, type = ro, define = yes;
26 RODATA: load = ROM0, type = ro, define = yes;
27 DATA: load = ROM0, run = RAM, type = rw, define = yes;
28 BSS: load = RAM, type = bss, define = yes;
29 VECTORS: load = ROMV, type = rw, define = yes;
33 CONDES: type = constructor,
34 label = __CONSTRUCTOR_TABLE__,
35 count = __CONSTRUCTOR_COUNT__,
37 CONDES: type = destructor,
38 label = __DESTRUCTOR_TABLE__,
39 count = __DESTRUCTOR_COUNT__,
41 CONDES: type = interruptor,
42 label = __INTERRUPTOR_TABLE__,
43 count = __INTERRUPTOR_COUNT__,