+# ld65 Linker-configuration for LUnix, Next Generation.
MEMORY {
- COMBINED: start = $0000, size = $FFFF, file = %O;
+ ZP: start = $80, size = $40; # userzp buffer
+ RAM: start = %S, size = $7600;
}
SEGMENTS {
- ZEROPAGE: load = COMBINED, type = zp;
- CODE: load = COMBINED, type = wprot;
- RODATA: load = COMBINED, type = wprot;
- DATA: load = COMBINED, type = rw, define = yes;
- BSS: load = COMBINED, type = bss, define = yes;
+ ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
+ STARTUP: load = RAM, type = wp; # First initiation code
+ LOWCODE: load = RAM, type = rw; # Legacy from other platforms
+ CODE: load = RAM, type = ro; # Program
+ RODATA: load = RAM, type = ro; # Literals, constants
+ DATA: load = RAM, type = rw; # Initiated variables
+ BSS: load = RAM, type = bss, define = yes; # Un-initiated variables
}
FEATURES {
CONDES: segment = RODATA,
%O: format = o65;
}
FORMATS {
- o65: os = lunix, type = small,
- import = LUNIXKERNEL,
- export = _main;
+ o65: os = lunix, type = small,
+ export = main, # Program entry-point
+# import = LIB6502, # Shared-library entry-points
+ import = LUNIXKERNEL; # Kernel entry-points
}
SYMBOLS {
- __STACKSIZE__ = $800; # 2K stack
+ __HEAPSIZE__ = $2000; # 8k heap [temporary, until LUnix malloc() exists]
+ __STACKSIZE__ = $0400; # 1k stack (do typical LUnix apps. need 2k?)
}