Re: [cc65] First release candidate available

From: Ullrich von Bassewitz <>
Date: 2009-09-29 17:29:45
On Tue, Sep 29, 2009 at 04:54:10PM +0200, Per Olofsson wrote:
> First of all the failed linking still creates a (broken) prg file. I
> would expect it not to create an output file if it fails.


> I assume that this is related to the startup code being moved into the
> library, but no map file is created so it's hard to tell what's going
> on. This is my crt0.s:

The compiler forces an import of a symbol named __STARTUP__ when it encounters
a function named "main". This causes crt0 to be linked in, which - because it
is now in a library - wouldn't otherwise be linked to the executable.

> I added the magic .export __STARTUP__:absolute = 1 (is this documented
> somewhere?), which took care of crt0, but something is still
> requesting a ZPSAVE segment. Any ideas?

Segments are required by the linker config. You can either define an empty
ZPSAVE segment, or use a custom linker config.

Documenting __STARTUP__ is a good idea. As is every suggestion that says "we
need better documentation" :-)

Seriously, I've never seen a startup file written from scratch (they're always
derived from the ones that come with cc65), so this is probably not as
important as it seems.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Sep 29 17:31:57 2009

This archive was generated by hypermail 2.1.8 : 2009-09-29 17:31:59 CEST