]> git.sur5r.net Git - cc65/blobdiff - src/ld65/cfg/c64.cfg
Define HEADER memory area for the EXEHDR segment for consistency reasons with the...
[cc65] / src / ld65 / cfg / c64.cfg
index 4517ed703fcc7401fa46f0d2896b2bc4d53d0761..2ce94b6fe52824237e3172643279acde309059b1 100644 (file)
@@ -1,19 +1,23 @@
 MEMORY {
-    ZP:  start = $0002, size = $001A, type = rw, define = yes;
-    RAM: start = $07FF, size = $C801, file = %O, define = yes;
+    ZP:     start = $0002, size = $001A, type = rw, define = yes;
+    HEADER: start = $07FF, size = $000E, file = %O;
+    RAM:    start = $080D, size = $C7F3, file = %O, define = yes;
 }
 SEGMENTS {
-    STARTUP:  load = RAM, type = ro;
-    LOWCODE:  load = RAM, type = ro,               optional = yes;
-    INIT:     load = RAM, type = ro, define = yes, optional = yes;
-    CODE:     load = RAM, type = ro;
-    RODATA:   load = RAM, type = ro;
-    DATA:     load = RAM, type = rw;
-    BSS:      load = RAM, type = bss, define = yes;
-    ZEROPAGE: load = ZP,  type = zp;
+    EXEHDR:   load = HEADER, type = ro;
+    STARTUP:  load = RAM,    type = ro;
+    LOWCODE:  load = RAM,    type = ro,               optional = yes;
+    INIT:     load = RAM,    type = ro, define = yes, optional = yes;
+    CODE:     load = RAM,    type = ro;
+    RODATA:   load = RAM,    type = ro;
+    DATA:     load = RAM,    type = rw;
+    ZPSAVE:   load = RAM,    type = bss;
+    BSS:      load = RAM,    type = bss, define = yes;
+    HEAP:     load = RAM,    type = bss, optional = yes; # must sit just below stack
+    ZEROPAGE: load = ZP,     type = zp;
 }
-FEATURES {                                         
-    CONDES: segment = RODATA,
+FEATURES {
+    CONDES: segment = INIT,
            type = constructor,
            label = __CONSTRUCTOR_TABLE__,
            count = __CONSTRUCTOR_COUNT__;
@@ -21,14 +25,13 @@ FEATURES {
            type = destructor,
            label = __DESTRUCTOR_TABLE__,
            count = __DESTRUCTOR_COUNT__;
-    # condes functions with type 2 are called in the interrupt
     CONDES: segment = RODATA,
            type = interruptor,
            label = __INTERRUPTOR_TABLE__,
            count = __INTERRUPTOR_COUNT__;
 }
 SYMBOLS {
-    __STACKSIZE__ = $800;      # 2K stack
+    __STACKSIZE__: value = $0800, weak = yes; # 2k stack
 }