mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 19:29:37 +00:00
a3a22733f8
The BSS segment and the ONCE segment share the same start address. So they need to be placed in two different memory areas. So far BSS was placed in the MAIN memory area and ONCE was placed in an additional memory area. Both memory areas were written to the output file. They just "happened" to be loadable and runnable at a stretch. Now ONCE is placed in the MAIN memory area and BSS is placed in an additional memory area. Only MAIN is written to the output file. It becomes more obvious that BSS is "just" defined to share memory with ONCE.
21 lines
702 B
INI
21 lines
702 B
INI
FEATURES {
|
|
STARTADDRESS: default = $0801;
|
|
}
|
|
SYMBOLS {
|
|
__LOADADDR__: type = import;
|
|
}
|
|
MEMORY {
|
|
ZP: file = "", start = $0002, size = $001A, define = yes;
|
|
LOADADDR: file = %O, start = %S - 2, size = $0002;
|
|
MAIN: file = %O, start = %S, size = $D000 - %S;
|
|
}
|
|
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;
|
|
RODATA: load = MAIN, type = ro, optional = yes;
|
|
DATA: load = MAIN, type = rw, optional = yes;
|
|
BSS: load = MAIN, type = bss, optional = yes;
|
|
}
|