Cross gcc Mailing List Archive
[Prev][Next][Index][Thread]
Re: RTEMS questions
-
Date: Thu, 31 Oct 1996 21:24:53 -0500 (EST)
-
From: Tony Bennett <tbennett@divnc.com>
-
Reply-To: Tony Bennett <tbennett@divnc.com>
-
Cc: robert@qbiosys.demon.co.uk
-
Cc: crossgcc@cygnus.com
-
Content-Type: text/plain; charset=US-ASCII
-
In-Reply-To: message of "Joel Sherrill <joel@merlin.gcs.redstone.army.mil>" <joel@merlin.gcs.redstone.army.mil> (on Thu, Oct 31/1996)
-
References: <846668052.15559.0@qbiosys.demon.co.uk> <Pine.SV4.3.91.961031090606.6364B-100000@merlin>
> 2) what to I need to do to get C++ support going. I've turned on support in
> the .cfg file, the cdtest compiles, but bombs out straight away when
> the program runs. I can run c++ programs OK stand-alone.
Assuming that gcc sets your global constructor's up to be called via
the __main() --> do_global_ctors() technique, then you need to verify
that __main() is being called before cdtest's main_task(). If gcc is
using some other method, then you might want to look at the posix
rtems-ctor.cc and define your own version of invoke_non_gnu_constructors().
The default one is empty. We have to do this to support HP C++ in our
hppa rtems apps.
Another easy mistake to make here is to have your global constructors
called before malloc() is initialized. Basically, you have to make sure
rtems_initialize_executive_early() is called and malloc is setup before
calling your global constructors. This can be tricky to get all the
dependencies right.
Joel> I suspect you are not getting the global constructors run.
Joel> The cdtest does not use global constructors.
cdtest does use global constructors. Its initial purpose in life was to
verify that we got global constructors & destructors working w/ rtems.
--tony
Follow-Ups:
- Re: RTEMS questions
- From: "Joel Sherrill <joel@merlin.gcs.redstone.army.mil>" <joel@merlin.gcs.redstone.army.mil>
Home |
Subject Index |
Thread Index