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]
Other format: [Raw text]

Re: Unable to declare object globally with CYG_INIT_PRIORITY


"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


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