mirror of
https://github.com/cc65/cc65.git
synced 2024-06-26 20:29:34 +00:00
Fixed INIT properties.
The main chunk load header references __BSS_LOAD__ so BSS must be the first bss type segment. Subsequent changes will move ONCE to share its address with the BSS. Then it'll be necessary to load INIT from disk. Therefore we do it right now.
This commit is contained in:
parent
692f96409d
commit
c768de156a
|
@ -23,10 +23,10 @@ MEMORY {
|
|||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__,
|
||||
size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__, size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
||||
# overlays
|
||||
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL2: file = "%O.2", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL3: file = "%O.3", start = %S, size = __OVERLAYSIZE__;
|
||||
|
@ -51,7 +51,7 @@ SEGMENTS {
|
|||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
|
|
|
@ -39,7 +39,7 @@ SEGMENTS {
|
|||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2400;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
|
@ -14,7 +13,6 @@ SYMBOLS {
|
|||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
|
@ -33,11 +31,7 @@ MEMORY {
|
|||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S +
|
||||
__LOWBSS_SIZE__, size = $D000 -
|
||||
__STACKSIZE__ -
|
||||
%S -
|
||||
__LOWBSS_SIZE__;
|
||||
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
@ -48,7 +42,6 @@ MEMORY {
|
|||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $DC00, size = $FFFA - $DC00;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
@ -73,7 +66,7 @@ SEGMENTS {
|
|||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2400;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
|
@ -10,7 +9,6 @@ SYMBOLS {
|
|||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
|
@ -29,13 +27,8 @@ MEMORY {
|
|||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S +
|
||||
__OVERLAYSIZE__ +
|
||||
__LOWBSS_SIZE__, size = $D000 -
|
||||
__STACKSIZE__ -
|
||||
%S -
|
||||
__OVERLAYSIZE__ -
|
||||
__LOWBSS_SIZE__;
|
||||
MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__ +
|
||||
__LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __OVERLAYSIZE__ - __LOWBSS_SIZE__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
@ -60,7 +53,6 @@ MEMORY {
|
|||
OVL8: file = "%O.8", start = %S, size = __OVERLAYSIZE__;
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
@ -85,7 +77,7 @@ SEGMENTS {
|
|||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
FEATURES {
|
||||
STARTADDRESS: default = $2400;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__EXEHDR__: type = import;
|
||||
__SYSTEM_CHECK__: type = import; # force inclusion of "system check" load chunk
|
||||
|
@ -9,7 +8,6 @@ SYMBOLS {
|
|||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: file = "", define = yes, start = $0082, size = $007E;
|
||||
|
||||
|
@ -28,11 +26,7 @@ MEMORY {
|
|||
|
||||
# "main program" load chunk
|
||||
MAINHDR: file = %O, start = $0000, size = $0004;
|
||||
MAIN: file = %O, define = yes, start = %S +
|
||||
__LOWBSS_SIZE__, size = $D000 -
|
||||
__STACKSIZE__ -
|
||||
%S -
|
||||
__LOWBSS_SIZE__;
|
||||
MAIN: file = %O, define = yes, start = %S + __LOWBSS_SIZE__, size = $D000 - __STACKSIZE__ - %S - __LOWBSS_SIZE__;
|
||||
|
||||
# defines entry point into program
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
|
@ -46,7 +40,6 @@ MEMORY {
|
|||
# memory beneath the ROM
|
||||
HIDDEN_RAM: file = "", define = yes, start = $E400, size = $FFFA - $E400;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
@ -71,7 +64,7 @@ SEGMENTS {
|
|||
CODE: load = MAIN, type = ro, define = yes;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = bss, optional = yes;
|
||||
INIT: load = MAIN, type = rw, optional = yes;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user