This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: init_priority fix for services/memalloc
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Mon, 27 Sep 2004 20:14:40 +0200
- Subject: Re: init_priority fix for services/memalloc
- References: <1096291622.3003.1.camel@famine> <20040927173933.GA4447@lunn.ch>
man, 27.09.2004 kl. 19.39 skrev Andrew Lunn:
> On Mon, Sep 27, 2004 at 03:27:02PM +0200, ?yvind Harboe wrote:
> > The following works w/GCC 3.4.2:
> >
> > static foo CYGBLD_ATTRIB_INIT_PRI(N) bar;
> >
> > This does not:
> >
> > static foo bar CYGBLD_ATTRIB_INIT_PRI(N) ;
>
> Is this just the init priority attribute or do all attributes break?
Don't know.
> How does it break. Syntax error or code which does the wrong
> thing.
Code does wrong thing.
The "-finit-priority" command line option no longer exists in GCC 3.4.2,
so I had to remove it before I could compile my app. I believe this to
be harmless though.
What I observed was that my initialisation routine was getting called
before pools where allocated, instead of before as with the toolchain
that I downloaded from sources.redhat.com/ecos.
When I modified the code as in the patch, things went back to "normal".
> Before changing eCos i would first list to check the its not
> GCC thats actually broken.
It would be nice to have a consensus from the eCos community before I
shout "compiler bug!" :-)
If my observations are correct then surely this is a compiler bug... Or
perhaps a problem w.r.t. how I built the compiler or somesuch.
> Thanks
> Andrew
--
Øyvind Harboe
http://www.zylin.com