From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-04-25 12:05:21
On Fri, Apr 25, 2003 at 12:33:50AM +0200, Groepaz wrote: > exactly what i said, you insist on doing the dodgy calculation as is, but in > the linker script :) i say its not needed. tell the linker to read the size > from the symbols and all is fine. please explain why you think what i say is > not sufficient coz i really dont get it. except that other linkers work like > you say, what is the reason not to do it like i suggested? ofcoz the linker > can know about __STACKSIZE__ if you tell him, it must read the linkerscript > at first (unless my understanding of the inner workings of the linker is > totally wrong) and then it knows about the values of defined symbols. it can > then link everything, including the stack segment (whose size is known). it > only needs to know that the heap segment gets linked last, since the linker > must know the remaining space in the memory area you load the heap segment > into. (if the heap size is specified in linkerscript, heap can be linked like > any other segment). I don't like the idea of building knowledge like this into the linker. It is not just that some symbols have a special meaning, it is also that some segment names are special, and are treated in a special way. It is rather difficult to remove kludges like this, once they got added, because existing code relies on it. > however, if you just dont like the idea of having a few things like > "__STACKSIZE__" hardcoded in the linker (your comment suggests that :=)) and > would prefer the generic (imho overkill here) approach you will indeed need > expressions and calculate things in the linkerscript like you say....i'm not > quite sure if that wouldnt be shooting a fly with a cannonball though :=) I still hope to come up with something that needs just a small (and clean) enhancement to the linker. 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-04-25 12:05:47 CEST