From: Oliver Schmidt
Date: Wed, 31 Jan 2018 07:54:48 +0000 (+0100)
Subject: Significantly simplified recently added linker config files.
X-Git-Tag: V2.17~40
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=80b09ba9fc42f65b84f91ea2d170325abe84fac1;p=cc65
Significantly simplified recently added linker config files.
I just forgot about the 'start' segment attribute - which makes the scenario at hand dead easy.
---
diff --git a/cfg/apple2-hgr.cfg b/cfg/apple2-hgr.cfg
index 540578b25..536491c67 100644
--- a/cfg/apple2-hgr.cfg
+++ b/cfg/apple2-hgr.cfg
@@ -4,35 +4,31 @@ FEATURES {
STARTADDRESS: default = $0803;
}
SYMBOLS {
- __EXEHDR__: type = import;
- __STACKSIZE__: type = weak, value = $0800; # 2k stack
- __HIMEM__: type = weak, value = $9600; # Presumed RAM end
- __LCADDR__: type = weak, value = $D400; # Behind quit code
- __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
- __MAIN_START__: type = export, value = %S;
- __MAIN_LAST__: type = export, value = __HIGH_LAST__;
+ __EXEHDR__: type = import;
+ __STACKSIZE__: type = weak, value = $0800; # 2k stack
+ __HIMEM__: type = weak, value = $9600; # Presumed RAM end
+ __LCADDR__: type = weak, value = $D400; # Behind quit code
+ __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
}
MEMORY {
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - 4, size = $0004;
- LOW: file = %O, fill = yes, start = %S, size = $2000 - %S;
- HGR: file = %O, fill = yes, start = $2000, size = $2000;
- HIGH: file = %O, define = yes, start = $4000, size = __HIMEM__ - $4000;
+ MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
- STARTUP: load = LOW, type = ro;
- LOWCODE: load = LOW, type = ro, optional = yes;
- HGR: load = HGR, type = rw, optional = yes;
- CODE: load = HIGH, type = ro;
- RODATA: load = HIGH, type = ro;
- DATA: load = HIGH, type = rw;
- INIT: load = HIGH, type = rw;
- ONCE: load = HIGH, type = ro, define = yes;
- LC: load = HIGH, run = LC, type = ro, optional = yes;
+ STARTUP: load = MAIN, type = ro;
+ LOWCODE: load = MAIN, type = ro, optional = yes;
+ HGR: load = MAIN, type = rw, optional = yes, start = $2000;
+ CODE: load = MAIN, type = ro start = $4000;
+ RODATA: load = MAIN, type = ro;
+ DATA: load = MAIN, type = rw;
+ INIT: load = MAIN, type = rw;
+ ONCE: load = MAIN, type = ro, define = yes;
+ LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
diff --git a/cfg/apple2enh-hgr.cfg b/cfg/apple2enh-hgr.cfg
index 540578b25..536491c67 100644
--- a/cfg/apple2enh-hgr.cfg
+++ b/cfg/apple2enh-hgr.cfg
@@ -4,35 +4,31 @@ FEATURES {
STARTADDRESS: default = $0803;
}
SYMBOLS {
- __EXEHDR__: type = import;
- __STACKSIZE__: type = weak, value = $0800; # 2k stack
- __HIMEM__: type = weak, value = $9600; # Presumed RAM end
- __LCADDR__: type = weak, value = $D400; # Behind quit code
- __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
- __MAIN_START__: type = export, value = %S;
- __MAIN_LAST__: type = export, value = __HIGH_LAST__;
+ __EXEHDR__: type = import;
+ __STACKSIZE__: type = weak, value = $0800; # 2k stack
+ __HIMEM__: type = weak, value = $9600; # Presumed RAM end
+ __LCADDR__: type = weak, value = $D400; # Behind quit code
+ __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
}
MEMORY {
ZP: file = "", define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = %S - 4, size = $0004;
- LOW: file = %O, fill = yes, start = %S, size = $2000 - %S;
- HGR: file = %O, fill = yes, start = $2000, size = $2000;
- HIGH: file = %O, define = yes, start = $4000, size = __HIMEM__ - $4000;
+ MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
- STARTUP: load = LOW, type = ro;
- LOWCODE: load = LOW, type = ro, optional = yes;
- HGR: load = HGR, type = rw, optional = yes;
- CODE: load = HIGH, type = ro;
- RODATA: load = HIGH, type = ro;
- DATA: load = HIGH, type = rw;
- INIT: load = HIGH, type = rw;
- ONCE: load = HIGH, type = ro, define = yes;
- LC: load = HIGH, run = LC, type = ro, optional = yes;
+ STARTUP: load = MAIN, type = ro;
+ LOWCODE: load = MAIN, type = ro, optional = yes;
+ HGR: load = MAIN, type = rw, optional = yes, start = $2000;
+ CODE: load = MAIN, type = ro start = $4000;
+ RODATA: load = MAIN, type = ro;
+ DATA: load = MAIN, type = rw;
+ INIT: load = MAIN, type = rw;
+ ONCE: load = MAIN, type = ro, define = yes;
+ LC: load = MAIN, run = LC, type = ro, optional = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {