From: Groepaz (groepaz_at_gmx.net)
Date: 2003-01-11 05:02:41
On Thursday 09 January 2003 12:17, Ullrich von Bassewitz wrote: > So what exactly do you expect none.lib and none.o look like? For the > former, this is more or less clear, however, many things will not work > because machine dependent things will be missing. But how should the latter > look to be usable? And what about the linker config? It assumes that the > whole address space can be used by the compiled program; an assumption that > is invalid for most real machines. none.lib: should include only the runtime library (required) and some important bits of the other libs which might be machine-independent (i would recommend this, but its questionable...might be useful to get fileio/conio ports going though). it should however be enough to compile any programs that do not call any functions :=) none.o: might not exist, there is probably no good way to have a somewhat "generic" version of this, although one could think of a generic one that doesnt setup the heap, and thus can work with an "open end" memory modell. this would be somewhat like what you get with a minimalistic gcc setup... it would be almost independent of the target (except cpu ofcoz, and the start-adress of text/bss etc which the user may give on commandline). i know this type of setup is very limited (programs cannot use malloc or anything else that needs the heap) but its still useful...if the (experienced) programmer chooses to not use any c-stylish memory management anyway, and wants to do a lot of highly specialised things by hand, that kinda setup may be still sufficient to write programs... and its obviously a nice way to get library ports going (like i was trying for NES conio) however, there should be a way to link an alternative "none.o" when the user uses "-t none" (currently it looks in the lib dir...probably some commandline option would be better) linker-config: might also not exist, but probably better be a "linear" modell (like it is) with at minimum beeing able to alter the common start-adress from (linker) commandline. at this point it should also be possible to use "-t none -C myown.cfg" to instruct the linker to link the none.lib, but use my own linker config. > What I fear is that once a real "none" target exists, people start > complaining that it is totally useless for real hardware. And IMHO they are > right about it. well, yes and no :) IMHO an option needs to be useable to judge its existance, so the question would be making it useable or removing it completely. and to me a "none" target only makes sence, if it allows to compile programs for which no other target exists - else its useless :) however, providing a none.o and none.cfg might be a bad idea since that would produce non working programs (even without generating an error) and even i couldnt bother less about them :=))) but IMHO a minimal none.lib is definetly required... ie, writing your own crt0.s and linker-config should be enough to get started with a new target...recompiling the runtime library is completely unnecessary here. (not to say that its a major annoying thing to do manually after each cvs download :=P) [as a sidenote, i would probably generally keep the runtime part and the other libraries in seperate .lib archives... that would have made this discussion unecessary for a start :=P] and for the rest of the library, i guess every user should get the idea that a "none" target doesnt have stdio or even tgi or whatever :) (i cant think of any reason why someone that doesnt know the difference would use the none target though :=P) -- ___ ___ .___________________ .___________ _______. c=64 / | \| \__ ___/ \ \_ _____/ \ \ [groepaz] gb / ' \ | | | / \ / \ | __)_ / | \ gp32 cgb \ . / | | |/ ' \| \/ | \ psx gba \___|_ /|___| |____|\____|__ /_______ /\____|__ / dc -----\/-----'---------------\/--------\/---------\/ http://www.hitmen-console.org Hitmen WWW Headquarters http://fly.to/hitmen-groepaz my personal playground http://rr.c64.org/silversurfer home of the RR debugger ftp.musoftware.de/pub/groepaz cc65 dump site ---------------------------------------------------------------------- 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-01-11 05:02:07 CET