Re: [cc65] linker cfg files

Date view Thread view Subject view

From: Greg King (
Date: 2003-04-25 11:07:13

From: Ullrich von Bassewitz
Date: Thursday, April 24, 2003, 12:19 PM
> On Thu., Apr. 24, 2003, at 07:35:26AM -0400, Greg King wrote:
> > You just need to expand that idea, when you design the libraries for
> > machines that have separated blocks of memory.  Give the stack and the
> > heap their own "STACK:" and "HEAP:" memory-area definitions.
> This is the part that doesn't work, and why I talked about having
> expression-evaluation in the linker-scripts:  You cannot use a separate
> memory-area for the heap, because this memory-area must start where
> the program ends.

I wasn't talking about the libraries/configurations that already have been
written.  I was talking about "new" configurations for the machines that
you mentioned, and the special requirements that Shawn described.  That
is:  there are several blocks of RAM -- which might sit "far apart" from
each other.  None of the blocks might be big enough to hold everything
that the program uses (code and data, plus static-, dynamic-, and
automatic-variables).  We would need to put some of those objects into
other RAM-blocks.  The heap (dynamic-) and the stack (automatic-) can be
two of those moved objects.  The heap doesn't need to be placed next to
the end of the program; it could have its own totally independent place --
anywhere in a machine's memory-map!  (It's used for dynamic memory, but it
can have a fixed location, and a fixed size.)

My comments were meant to remind everyone that we already can create that
kind of configuration.  We don't need to wait for upgrades to the linker.
The addresses of the RAM-blocks would be known constants -- expressions
aren't needed in the linker-scripts.

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-04-25 11:35:29 CEST