]> git.sur5r.net Git - cc65/blobdiff - src/ld65/cfg/lunix.cfg
Better handling of imports in the ExprNode structure.
[cc65] / src / ld65 / cfg / lunix.cfg
index ebbf17c9cdb1962fc707b69a272687bd96015fdb..8e29d634d01320ff093e4a34b6aea0bd3ba53a0f 100644 (file)
@@ -1,37 +1,43 @@
 # ld65 Linker-configuration for LUnix, Next Generation.
+
+SYMBOLS {
+    __HEAPSIZE__:  value = $2000, weak = yes; # 8k heap [temporary, until LUnix malloc() exists]
+    __STACKSIZE__: value = $0400, weak = yes; # 1k stack (do typical LUnix apps. need 2k?)
+}
 MEMORY {
-    ZP:         start = $0080, size = $0040;        # userzp buffer
-    RAM: start = %S,  size = $7600;
+    ZP:         start = $0080, size = $0040;
+    RAM: start = %S,    size = $7600 - __STACKSIZE__;
 }
 SEGMENTS {
-    ZEROPAGE: load = ZP,  type = zp,  define = yes; # Pseudo-registers
-    STARTUP:  load = RAM, type = ro;   # First initiation code
-    LOWCODE:  load = RAM, type = ro, optional = yes; # Legacy from other platforms
-    INIT:     load = RAM, type = ro, define = yes, optional = yes;
-    CODE:     load = RAM, type = ro;   # Program
-    RODATA:   load = RAM, type = ro;   # Literals, constants
-    DATA:     load = RAM, type = rw;   # Initialized variables
-    BSS:      load = RAM, type = bss, define = yes; # Uninitialized variables
+    ZEROPAGE: load = ZP,  type = zp,  define = yes;                 # Pseudo-registers
+    STARTUP:  load = RAM, type = ro;                               # First initialization code
+    LOWCODE:  load = RAM, type = ro,                optional = yes; # Legacy from other platforms
+    INIT:     load = RAM, type = ro,  define = yes, optional = yes; # Library initialization code
+    CODE:     load = RAM, type = ro;                               # Program
+    RODATA:   load = RAM, type = ro;                               # Literals, constants
+    DATA:     load = RAM, type = rw;                               # Initialized variables
+    BSS:      load = RAM, type = bss, define = yes;                 # Uninitialized variables
 }
 FEATURES {
     CONDES: segment = INIT,
-           type = constructor,
-           label = __CONSTRUCTOR_TABLE__,
-           count = __CONSTRUCTOR_COUNT__;
+           type    = constructor,
+           label   = __CONSTRUCTOR_TABLE__,
+           count   = __CONSTRUCTOR_COUNT__;
+    CONDES: segment = RODATA,
+           type    = destructor,
+           label   = __DESTRUCTOR_TABLE__,
+           count   = __DESTRUCTOR_COUNT__;
     CONDES: segment = RODATA,
-           type = destructor,
-           label = __DESTRUCTOR_TABLE__,
-           count = __DESTRUCTOR_COUNT__;
+            type    = interruptor,         
+           label   = __INTERRUPTOR_TABLE__,
+           count   = __INTERRUPTOR_COUNT__;
 }
 FILES {
     %O: format = o65;
 }
 FORMATS {
-    o65: os = lunix, type = small,
+    o65: os     = lunix,
+         type   = small,
          export = main,                # Program entry-point
          import = LUNIXKERNEL; # Kernel entry-points
 }
-SYMBOLS {
-    __HEAPSIZE__  = $2000;      # 8k heap [temporary, until LUnix malloc() exists]
-    __STACKSIZE__ = $0400;      # 1k stack (do typical LUnix apps. need 2k?)
-}