This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Unable to declare object globally with CYG_INIT_PRIORITY
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Romil Shah" <rshah at slscorp dot com>
- Cc: "Ecos-Discuss" <ecos-discuss at sources dot redhat dot com>
- Date: 07 May 2004 10:05:32 +0100
- Subject: Re: [ECOS] Unable to declare object globally with CYG_INIT_PRIORITY
- References: <IDECIALELMFIGAKPHIFKAEGECCAA.rshah@slscorp.com>
"Romil Shah" <rshah@slscorp.com> writes:
> -----Original Message-----
> From: Romil Shah [mailto:rshah@slscorp.com]
> Sent: Friday, May 07, 2004 10:24 AM
> To: radhaamanji@yahoo.co.uk
> Cc: Ecos-Discuss; fredrik@wespot.com; Thomas.Koeller@baslerweb.com
> Subject:
>
>
>
> Sir,
> Thanks for your reply i found out the problem , wihch was not due
> to -finit-priority but it is on declaration of static objects using
> CYGBLD_ATTRIB_INIT_PRI(X).
That's two aspects of the same thing. -finit-priority turns on
constructor prioritization, and the CYGBLD_ATTRIB_INIT_PRI() macro
assigns priorities to constructors.
> The problem i am facing is as follows:
>
> If i enable
> static cyg_io_init_class _cyg_io_init CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO);
> in ioinit.cxx under infra directory my programs gets hang similarly is the
> case with all the cpp files where CYGBLD_ATTRIB_INIT_PRI or
> CYG_INIT_PRIORITY has been used to declare the object.
>
> I am using an internally designed microprocessor based on MIPS
> architecture ,so please any suggestion regarding my problem will be
> highly helpful to me.
If you have an internally designed microprocessor, then presumably you
have an internally developed version of GCC to go with it. It looks
like either the compiler or linker may not be implementing
constructor priorities correctly.
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss