C++ static constructors are not called...:-(

Leon Pollak leonp at plris.com
Wed Nov 12 14:16:26 UTC 2003


On Wednesday 12 November 2003 10:45, you wrote:
> Leon Pollak wrote:
> > Hello, all.
> > 	I finally see that my powerpc-rtems environment on RH9 (bsp derived from
> > mpbx8xx) does not call static constructors.
> > 	There is a lot of mails in the list about this, I studied most of them
> > and must confess - I understood almost zero.
> > 	All I know is that _Thread_Handler call directly my Init without ctors.
> > 	Can somebody be so kind to tell me what I must do to force ctors
> > calling?
> >
> > 	Many many thanks ahead...
>
> Hello
>
> Look at the file c/src/lib/libsp/powerpc/your_bsp/bsp_specs and check if
> you are getting linked with crtbegin and crtend.
> I've attached my bsp_specs, it works for me.
>
> Yacine.

Thank you for reply.
Yes, I do have crtbegin/end in my bsp_specs, but this does not work. I see in 
debugger entering into the __init() code, which exits after 4-5 assembler 
commands.

Anyway, I am exhausted of searches and simply have written my own cycle of 
calls to ctors, which I have put into the first line of Init task - this 
works fine...:-))

Thanks again for your reply.
-- 
Leon
leonp at plris dot com




More information about the users mailing list