Re: [cc65] Chicken and Egg Problem (?)

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2009-08-27 17:38:39
Hi!

On Mon, Aug 24, 2009 at 08:49:11PM +0200, Oliver Schmidt wrote:
> > 2) No, because the built-in configure-code _is_ "hard-wiring".  We do not
> > want the "-t" option to force people to stuff an artificial "_main:" label
> > into their purely assembly-coded programs.
>
> Do you really see purely assembly-coded programs using built-in Linker
> configs (with their multiple obligatory segments etc.) ?

I've checked the possibility of adding such a linker config option and - for
now - it's too much work. The linker config is read *after* the command line
is parsed and all object files and libraries are read. At that point, all
modules that should be linked are already determined. Adding an additional
import in this stage is not possible. Changing the order (reading the config
before all other stuff) is not easily possible, since it relies on information
from the modules.

So I've added a linker command line option "--force-import" instead. As a nice
side effect, this does also spare us the discussion about having a forced
import of "_main" in the builtin linker or not. For applications that have
main() in a library, just add "--force-import _main" (or "--force-import
__STARTUP__") to the linker or cl65 command line, and things should be ok.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Aug 27 17:40:52 2009

This archive was generated by hypermail 2.1.8 : 2009-08-27 17:40:55 CEST