Re: [cc65] Overlaying segments?

From: Oliver Schmidt <>
Date: 2009-11-10 17:42:17
Hi Fatih,

> I don't need any stack or heap. I want the INIT_* segments overlaid with BSS, not only
> in the file but in the memory too. I clear BSS later, in the CODE segment.

Now I understand your problem. Afaik there's no clean way to do this
with ld65. Some years ago I did a hack to workaround it - not that I
would recommend it, but...*checkout*/contiki/contiki-apple2/lib/crt0.S

Check out the code below the meaningful comment:

; The linker doesn't understand that the "BOOT" segment overlays the "BSS"
; segment so the automatic fixup of references to the "BOOT" segment does
; not work. Therefore references to this segment have to be expressed as
; offsets to __BSS_RUN__.

And here's the corresponding linker config:*checkout*/contiki/contiki-apple2/apple2enh.cfg

Best, Oliver
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 10 17:42:25 2009

This archive was generated by hypermail 2.1.8 : 2009-11-10 17:42:26 CET