This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Placement in CTOR_LIST


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]