Static section initializing
gregory.menke at gsfc.nasa.gov
gregory.menke at gsfc.nasa.gov
Tue Nov 25 16:03:50 UTC 2003
Leon Pollak writes:
> Hello, All.
> Some time ago I posted the message about the problem with C/C++ start file
> (crt0...) in mbx8xx derived BSP. The only reply I received did not help a lot
> :-(( (sorry...), therefore I simply wrote my own routine which called ctors.
> The problem is that I forgot about static sections and now I arrived to this
> point. I also can write (copy) this code by myself, but it seems to me
> already as an exaggeration...:-)))
> So, I try again the same question to the list :-). As I followed the
> _Thread_Handler execution it calls the _init() function, but this _init()
> contains exactly 5 lines of assembler which do nothing.
> The bsp_specs file is standard from mbx8xx and contains:
>
> *startfile:
> %{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: \
> %{!qrtems_debug: } \
> %{qrtems_debug: } ecrti%O%s}}
>
> What may be the problem?
> Any help will be highly appreciated
>
IIRC, _init is empty because you don't have quite the right set of
system libraries in your link script. I think you need to include the
crtbegin, crtend- which gcc generates. Look at the motorola_shared
bsp's link script- last time I used C++ in RTEMS it handled the
constructors properly.
Gregm
More information about the users
mailing list