_init()

Ed Sutter esutter at lucent.com
Fri Jul 1 21:19:40 UTC 2005


Hi!,
I built the gen405 bsp, with minor modifications to the serial
port, and when I run it, it drops off the end of the earth when
_init() is called out of _Thread_Handler().  I see that _init
is essentially a function prolog, and according to the "Using C++"
Wiki documentation (thanks Chris) it should be followed by all
of the constructor initialization calls, and then an epilog.
I can't find any of that in my build (I'm not even using C++).
Symbolically, the next entry is _fini, which appears to also be
a prolog.  After that is just some other data totally unrelated
to this; hence the execution just takes an exception at that point.

The Wiki says that alignment of the prolog/calls/epilog is pretty
tricky and requires that...

  "... gcc configuration, linkcmds and bsp_specs must harmonize ..."

At the moment, I'm simply trying to run the hello_world_c demo.
I used the "off-the-shelf" stuff from the rtems site (rtems4.6.2,
gcc-3.2.3, binutils-2.13.2.1, newlib-1.11.0, examples-4.6.2), so
before I start pulling what little hair I have left out, can someone
give me a clue as to whether or not this should work by default or not?

By the way, if I simply remove the call to _init(), the app runs
fine; however, I want to make sure that's an ok thing to do.

Thanks for any help in advance!
Ed Sutter






More information about the users mailing list