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