I have just updated the support file on my website:
http://sbc.rictor.org/support/CC65forSim.zipIt now support's printf.
As far as working with CC65 from Linux, I cannot really help you. I have it running on my windows 7 box and the included batch files work. The sim target is really a minimally supported target. You could remove some of the support files, but that will only take away features from the library. If you don't use them, they won't get loaded into your executable code anyway.
if you can edit each of these files to fit your target, it should be easy to create your own. If your target does not support a feature, just set it up to return 0, if it returns a value. You do have to mind the stack operations, however.
The best way to see what is being loaded is to view the sim.map output file. It will give addresses to various sections, including those for library routines. To see a particular library routine, just move into the libsrc folder, go into the sim folder, and you can view the .lst files for each file. Also, I modified the makesim.bat files to provide the lst files for the common, runtime, dbg, and conio folders. After a while, you begin to see how the object file gets populated.
Hope this helps
Daryl
_________________
Please visit my website ->
https://sbc.rictor.org/