2009/7/7 Alistair Buxton <a.j.bux...@gmail.com>: > 2009/7/7 <bob...@comcast.net>: >> >> ----- Alistair Buxton wrote: >> >>> When I use my custom crt0, in the final binary, gsinit: is pointing to >>> GSFINAL instead of GSINIT. >> >> crt0 needs to be the first module in the list of modules you link. >> If it is not first, then the gsinit label will not be ahead of the stuff >> the compiler puts in the GSINIT area. This is not documented >> very well. I think that when you let sdcc magically add crt0, it >> places it ahead of everything else you link. But when you use >> the "--no-std-crto", it is up to you to put it first. > > If I place crt0 first in the list of files for the linker, it produces > no output at all. No error messages, and no IHX file. > The linker seems to want the .o file with main() first.
After digging deeper this seems to be a problem with the sdcc front end - the linker produces correct output and then sdcc promptly deletes it because it expected the linker to use an intermediate file name, but link-z80 directly uses the name specified by -o. I have reported a bug: https://sourceforge.net/tracker/?func=detail&aid=2819835&group_id=599&atid=100599 -- Alistair Buxton a.j.bux...@gmail.com ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user