]> git.sur5r.net Git - cc65/blob - src/ld65/cfg/lunix.cfg
No copyright message here.
[cc65] / src / ld65 / cfg / lunix.cfg
1 # ld65 Linker-configuration for LUnix, Next Generation.
2
3 SYMBOLS {
4     __HEAPSIZE__:  type = weak, value = $2000; # 8k heap [temporary, until LUnix malloc() exists]
5     __STACKSIZE__: type = weak, value = $0400; # 1k stack (do typical LUnix apps. need 2k?)
6 }
7 MEMORY {
8     ZP:  start = $0080, size = $0040;
9     RAM: start = %S,    size = $7600 - __STACKSIZE__;
10 }
11 SEGMENTS {
12     ZEROPAGE: load = ZP,  type = zp,  define = yes;                 # Pseudo-registers
13     STARTUP:  load = RAM, type = ro;                                # First initialization code
14     LOWCODE:  load = RAM, type = ro,                optional = yes; # Legacy from other platforms
15     INIT:     load = RAM, type = ro,  define = yes, optional = yes; # Library initialization code
16     CODE:     load = RAM, type = ro;                                # Program
17     RODATA:   load = RAM, type = ro;                                # Literals, constants
18     DATA:     load = RAM, type = rw;                                # Initialized variables
19     BSS:      load = RAM, type = bss, define = yes;                 # Uninitialized variables
20 }
21 FEATURES {
22     CONDES: type    = constructor,
23             label   = __CONSTRUCTOR_TABLE__,
24             count   = __CONSTRUCTOR_COUNT__,
25             segment = INIT;
26     CONDES: type    = destructor,
27             label   = __DESTRUCTOR_TABLE__,
28             count   = __DESTRUCTOR_COUNT__,
29             segment = RODATA;
30     CONDES: type    = interruptor,
31             label   = __INTERRUPTOR_TABLE__,
32             count   = __INTERRUPTOR_COUNT__,
33             segment = RODATA,
34             import  = __CALLIRQ__;
35 }
36 FILES {
37     %O: format = o65;
38 }
39 FORMATS {
40     o65: os     = lunix,
41          type   = small,
42          export = main,         # Program entry-point
43          import = LUNIXKERNEL;  # Kernel entry-points
44 }