Harmonized asm linker configs.

- All segments but CODE are optional and CODE is R/W. Both together allow to "just" write code/data without ever explicitly using a segment.

- Symbols are defined for the BSS. This allows to use/implement zerobss.

- The ZP memory area isn't artificially limited.
This commit is contained in:
Oliver Schmidt
2016-03-17 21:51:20 +01:00
parent d5092d2d3f
commit 78dcb61cb8
5 changed files with 21 additions and 21 deletions

View File

@@ -5,7 +5,7 @@ SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZP: file = "", start = $0002, size = $001A, define = yes;
ZP: file = "", start = $0002, size = $00FE, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002;
MAIN: file = %O, start = %S, size = $D000 - %S;
}
@@ -13,8 +13,8 @@ SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = rw, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = MAIN, type = rw, optional = yes;
BSS: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, optional = yes, define = yes;
}