1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-26 08:32:00 +00:00

Consider the segment attributes 'define' and 'optional' mutually exclusive.

In normal situations it isn't too useful to define symbols for optional segments as those symbols can't be presumed to be always present.

I in fact suspect that most currently present combinations of 'define' and 'optional' aren't useful - apart form the overlay configurations of course.
This commit is contained in:
Oliver Schmidt 2016-03-17 21:31:43 +01:00
parent e3cbc7e8b8
commit d5092d2d3f
22 changed files with 95 additions and 95 deletions

View File

@ -7,13 +7,13 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -14,13 +14,13 @@ SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -14,13 +14,13 @@ SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -19,13 +19,13 @@ SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = rw;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
ONCE: load = MAIN, type = ro, define = yes;
BSS: load = BSS, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -14,18 +14,18 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
EXTZP: load = ZP, type = rw, define = yes;
EXEHDR: load = HEADER, type = rw;
STARTUP: load = STARTUP, type = rw;
PAGE2: load = PAGE2, type = rw;
PAGE3: load = PAGE3, type = rw;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -11,18 +11,18 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
EXTZP: load = ZP, type = rw, define = yes;
EXEHDR: load = HEADER, type = rw;
STARTUP: load = STARTUP, type = rw;
PAGE2: load = PAGE2, type = rw;
PAGE3: load = PAGE3, type = rw;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -32,7 +32,7 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: type = zp, load = ZP;
EXTZP: type = zp, load = ZP, optional = yes;
EXTZP: type = zp, load = ZP, optional = yes;
EXTBSS: type = bss, load = EXT, define = yes, optional = yes;
FILEINFO: type = ro, load = CVT, offset = $002;
RECORDS: type = ro, load = CVT, offset = $100, optional = yes;
@ -45,7 +45,7 @@ SEGMENTS {
RODATA: type = ro, run = VLIR0, load = CVT;
DATA: type = rw, run = VLIR0, load = CVT;
INIT: type = bss, load = VLIR0, optional = yes;
BSS: type = bss, load = VLIR0, define = yes;
BSS: type = bss, load = VLIR0, define = yes;
VLIRIDX1: type = ro, load = CVT, align = $200, optional = yes;
OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $200, optional = yes;
VLIRIDX2: type = ro, load = CVT, align = $200, optional = yes;

View File

@ -31,7 +31,7 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: type = zp, load = ZP;
EXTZP: type = zp, load = ZP, optional = yes;
EXTZP: type = zp, load = ZP, optional = yes;
DIRENTRY: type = ro, load = CVT, align = $FE;
FILEINFO: type = ro, load = CVT, align = $FE;
RECORDS: type = ro, load = CVT, align = $FE, optional = yes;
@ -42,7 +42,7 @@ SEGMENTS {
RODATA: type = ro, run = VLIR0, load = CVT;
DATA: type = rw, run = VLIR0, load = CVT;
INIT: type = bss, load = VLIR0, optional = yes;
BSS: type = bss, load = VLIR0, define = yes;
BSS: type = bss, load = VLIR0, define = yes;
OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $FE, optional = yes;
OVERLAY2: type = ro, run = VLIR2, load = CVT, align_load = $FE, optional = yes;
OVERLAY3: type = ro, run = VLIR3, load = CVT, align_load = $FE, optional = yes;

View File

@ -9,14 +9,14 @@ MEMORY {
MAIN: start = %S, size = $7600 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
STARTUP: load = MAIN, type = ro; # First initialization code
LOWCODE: load = MAIN, type = ro, optional = yes; # Legacy from other platforms
ONCE: load = MAIN, type = ro, optional = yes; # Library initialization code
CODE: load = MAIN, type = ro; # Program
RODATA: load = MAIN, type = ro; # Literals, constants
DATA: load = MAIN, type = rw; # Initialized variables
BSS: load = MAIN, type = bss, define = yes; # Uninitialized variables
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
STARTUP: load = MAIN, type = ro; # First initialization code
LOWCODE: load = MAIN, type = ro, optional = yes; # Legacy from other platforms
ONCE: load = MAIN, type = ro, optional = yes; # Library initialization code
CODE: load = MAIN, type = ro; # Program
RODATA: load = MAIN, type = ro; # Literals, constants
DATA: load = MAIN, type = rw; # Initialized variables
BSS: load = MAIN, type = bss, define = yes; # Uninitialized variables
}
FEATURES {
CONDES: type = constructor,

View File

@ -35,15 +35,15 @@ MEMORY {
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = HEADER, type = ro;
STARTUP: load = ROM0, type = ro, define = yes;
LOWCODE: load = ROM0, type = ro, optional = yes;
ONCE: load = ROM0, type = ro, optional = yes;
CODE: load = ROM0, type = ro, define = yes;
RODATA: load = ROM0, type = ro, define = yes;
DATA: load = ROM0, run = RAM, type = rw, define = yes;
STARTUP: load = ROM0, type = ro, define = yes;
LOWCODE: load = ROM0, type = ro, optional = yes;
ONCE: load = ROM0, type = ro, optional = yes;
CODE: load = ROM0, type = ro, define = yes;
RODATA: load = ROM0, type = ro, define = yes;
DATA: load = ROM0, run = RAM, type = rw, define = yes;
VECTORS: load = ROMV, type = rw;
CHARS: load = ROM2, type = rw;
BSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -7,12 +7,12 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = rw;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -16,9 +16,9 @@ MEMORY {
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
BOOT: load = HEAD, type = ro, optional = yes;
BOOT: load = HEAD, type = ro, optional = yes;
CODE: load = MAIN, type = rw;
RODATA: load = MAIN, type = rw;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}

View File

@ -14,13 +14,13 @@ SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes;
ONCE: load = RAM, type = ro, optional = yes;
LOWCODE: load = RAM, type = ro, optional = yes;
ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw;
INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -14,13 +14,13 @@ SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -11,12 +11,12 @@ SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -11,12 +11,12 @@ SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -20,8 +20,8 @@ MEMORY {
ROM: file = %O, start = $c000, size = $4000, fill = yes, fillval = $FF;
}
SEGMENTS {
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro;
BANK1: load = BANKROM1, type = ro;
BANK2: load = BANKROM2, type = ro;
@ -30,8 +30,8 @@ SEGMENTS {
BANK5: load = BANKROM5, type = ro;
BANK6: load = BANKROM6, type = ro;
BANK7: load = BANKROM7, type = ro;
ZEROPAGE: load = RAM, type = bss, define = yes;
DATA: load = RAM, type = bss, define = yes, offset = $0200;
BSS: load = RAM, type = bss, define = yes;
VECTOR: load = ROM, type = ro, offset = $3FFA;
ZEROPAGE: load = RAM, type = bss, define = yes;
DATA: load = RAM, type = bss, define = yes, offset = $0200;
BSS: load = RAM, type = bss, define = yes;
VECTOR: load = ROM, type = ro, offset = $3FFA;
}

View File

@ -14,15 +14,15 @@ MEMORY {
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $3FF0;
VECTOR: load = ROM, type = ro, offset = $3FFA;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp, define = yes;
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $3FF0;
VECTOR: load = ROM, type = ro, offset = $3FFA;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -16,15 +16,15 @@ MEMORY {
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $FF;
}
SEGMENTS {
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro;
RODATA: load = ROM, type = ro;
BANK1: load = BANKROM1, type = ro;
BANK2: load = BANKROM2, type = ro;
BANK3: load = BANKROM3, type = ro;
ZEROPAGE: load = RAM, type = bss, define = yes;
DATA: load = RAM, type = bss, define = yes, offset = $0200;
BSS: load = RAM, type = bss, define = yes;
VECTOR: load = ROM, type = ro, offset = $3FFA;
ZEROPAGE: load = RAM, type = bss, define = yes;
DATA: load = RAM, type = bss, define = yes, offset = $0200;
BSS: load = RAM, type = bss, define = yes;
VECTOR: load = ROM, type = ro, offset = $3FFA;
}

View File

@ -13,15 +13,15 @@ MEMORY {
ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $7FF0;
VECTOR: load = ROM, type = ro, offset = $7FFA;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp, define = yes;
LOWCODE: load = ROM, type = ro, optional = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $7FF0;
VECTOR: load = ROM, type = ro, offset = $7FFA;
BSS: load = RAM, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -16,13 +16,13 @@ SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,

View File

@ -14,13 +14,13 @@ SEGMENTS {
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,