This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Placement in CTOR_LIST
- To: "N.Suresh" <nsuresh at cdotb dot ernet dot in>
- Subject: Re: [ECOS] Placement in CTOR_LIST
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 04 Oct 2001 14:52:25 +0100
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <3BBC17ED.9040603@cdotb.ernet.in>
"N.Suresh" wrote:
>
> Hi,
> How can control the order in which the CTOR_LIST's constructors
> getting called..
> My network initialisation function is getting called before my
> serial driver initialisation ..
> so diag_printf inside cyg_kmem_init is failing..
C++ Constructors are marked with CYGBLD_ATTRIB_INIT_PRIORITY (defined in
infra's cyg_type.h).
In init.cxx, the net is initialized after libc (look at the list of
priorities in cyg_type.h). But serial drivers are initialized before that.
Maybe your CTOR_LIST hasn't been sorted correctly by the linker.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine