Re: [cc65] Overlaying segments?

From: Fatih Aygün <cyco1301yahoo.com>
Date: 2009-11-10 18:47:54
Oliver Schmidt wrote:

> 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...
> 
> http://contiki.cvs.sourceforge.net/viewvc/*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:
> 
> http://contiki.cvs.sourceforge.net/viewvc/*checkout*/contiki/contiki-apple2/apple2enh.cfg
> 
> Best, Oliver

That's very close to what I want to achieve. But I'll go with the perl option since my initialization 
code is much bigger. It's, in fact, bigger than the main code. It would be very error prone for me
to express everything as offsets from __BSS_RUN__. But for normal initialization tasks I think
your trick is way more clever :)


Thanks,
Fatih.


      
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 10 18:48:00 2009

This archive was generated by hypermail 2.1.8 : 2009-11-10 18:48:03 CET