Re: [cc65] o65 generation bug?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-05-26 12:35:41
Hi!

On Fri, May 25, 2012 at 05:18:27PM -0400, Greg King wrote:
> I apologize; I was half wrong.  I had forgotten about a bug in ld65.  It
> uses $0000 in O65 files instead of the actual values of linker-generated
> labels (the SIZE expressions are used correctly).

You are right here. Is there any reason not to use exactly one memory area
with $0000 as a start address in the config file? While the linker cannot
always generate output in "simple" format (alignment options may prevent
that), having the segments in adjacent order starting at zero should always be
possible. Or is this wrong?

> In my LUnix code, the zerobss subroutine failed because __BSS_RUN__ was
> wrong.  So, I used a work-around:  I added a BSSRUN segment between DATA
> and BSS.  I defined and exported "__BSS_RUN__:" from that segment.  (The
> linker warned about a duplicate symbol; but, the trick worked.  zerobss
> got the proper address.)

This might work in your case, but the solution is dangerous, since you cannot
determine which one of the symbol values the linker will use. You might
consider a bug report if you find something similar in the future :-)

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sat May 26 12:38:42 2012

This archive was generated by hypermail 2.1.8 : 2012-05-26 12:38:45 CEST