From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-08-18 11:15:12
Hi! On Mon, Aug 18, 2003 at 04:08:24AM -0400, Greg King wrote: > I was thinking of the programmer who might want to steal a region from the > high end of "normal" RAM. He would need to move the stack out of his way. > (But, he wouldn't need to move the start of his program.) Without %E, he > would need to write a special script; with %E, he would need only to add an > option to the command-line that builds the program. > > I see %E as a natural compliment of %S. (If a command-line can move the > bottom easily, then it should be able to move the top easily, too.) %S is more or less a relict from the old cc65, where the start address could be specified. None of the existing targets does use it besides "none", which is not a real target, and "lunix" where use of %S is not really necessary. So the argument that we need %E because %S is already there is questionable. I don't think that we need to protect a cc65 user against using a customized linker script by any means. Instead of using %S, the standard linker script could be used and the start address of the segment changed. This is not much more work than just adding -S to the command line. > I don't see it as a _special_ solution. I think it is special. Here is how a more general solution would work (and this is what I will add when adding expressions to the linker scripts): Allow to pass arbitrary values from the linker command line into the linker script by using something like --define endaddr=0x2000 The variable could later be accessed as %endaddr in the linker script. Anyway, I would suggest that we try to leave things as they are now. At some point in the future, I will add expression evaluation for the linker, which will solve lots of problems at once without a need for any special solutions. To solve the heap issue, I will think about moving the heap variable initialization into the machine specific directories. This would allow platforms with non contigous memory to use the heap. Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-08-18 11:15:34 CEST