Subject: Re: foo_init()s in main() [was: CVS commit: src/sys]
To: None <tech-kern@NetBSD.org>
From: Rhialto <rhialto@falu.nl>
List: tech-kern
Date: 11/25/2005 21:45:52
On Tue 22 Nov 2005 at 10:29:17 +0100, joerg@britannica.bec.de wrote:
> The only question for NetBSD adoption is, whether any architecture still
> has a non-ELF kernel. I don't mean the format of the final image, but
> whether the linkage is ELF. Depending on that, the work can be just used
> or needs some work in ld for the specific format.

Why not have config(8) generate a table with function pointers in the
correct order, to be called from main() (or whereever)?

Another option is to make the linker do the same as what it does for C++
global constructors, except that their order isn't specified. (or is
that those 'link sets' that were mentioned?)

> Joerg
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl        -- Cetero censeo "authored" delendum esse.