[cc65] ld65 does not generate map file on "Start address too low" error

From: Brad Smith <rainwarrior1gmail.com>
Date: 2015-10-19 20:58:51
ld65 will still generate a map file on a regular segment overflow, but if
you have another segment that follows the overflowed one with a start
address, the "start address too low" error appears to prevent generation of
the map file.

This prevents someone from being able to use the map file to analyze an
overflow problem in this case. Simple example provided below.

example linker config:

BLOCK:   start = $00, size = 20,   type = ro, file = %O, fill = yes,
fillval = 0;
B1: load = BLOCK, type = ro;
B2: load = BLOCK, start=10, type = ro;

example assembly source:

; generate overflow in B1 (causes start address too low error)
.segment "B1"
.repeat 30
.byte $55

; generate overflow in B2 (this alone does not prevent map generation)
.segment "B2"
.repeat 30
.byte $55

compile and link:

ca65 test.s
ld65 -o test.bin -C test.cfg -m test.map.txt test.o

resulting error message:

ld65: Warning: test.cfg(2): Memory area overflow in `BLOCK', segment `B1'
(10 bytes)
ld65: Error: test.cfg(2): Start address too low in `BLOCK', segment `B2'

-- Brad Smith

To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Oct 19 20:59:01 2015

This archive was generated by hypermail 2.1.8 : 2015-10-19 20:59:03 CEST