Re: [cc65] some patches

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-03-15 23:19:11
On Mon, Mar 15, 2010 at 09:54:51PM +0100, Kajtár Zsolt wrote:
> Yes, it's too late at that time. But what about moving the interrupt
> setup/restore code into 2 functions. Then if there's any interrupt handling
> necessary these could linked in and called from the __CONSTRUCTOR_TABLE__ and
> __DESTRUCTOR_TABLE__ by the normal initlib/donelib.

That doesn't work. 

A constructor is only called if it is part of a module that is actually linked
in. There is no way for the linker to determine if interrupt support is
needed. And even if we could add some magic, the calls to the setup/restore
functions cannot be removed by the linker if they're part of crt0.s.

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 Mon Mar 15 23:19:19 2010

This archive was generated by hypermail 2.1.8 : 2010-03-15 23:19:21 CET