[rtems-users] C++ Virtual Functions

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Tue Feb 1 21:07:22 UTC 2005


gregory.menke at gsfc.nasa.gov wrote:
> Smith, Gene writes:
>  > I am having some problems running code containing C++ virtual functions in
>  > rtems. When the code tries to branch to a virtual function address using
>  > "bctrl" instruction, the address (in ctr) is way out of range and results in
>  > a machine check exception.
>  > 
>  > Is there anything I need to do special in rtems for virtual functions to
>  > work? Is anyone using virtual functions, pure or impure, in rtems? I am
>  > still using rtems 4.6.1 and my ppc40x-derived bsp.
>  > 
>  > Tks,
>  > -gene
> 
> This is generally caused by problem with the linkscript where the
> various tables are set up incorrectly.  The motorola_shared bsp link
> script works, so you might compare them for discrepancies.  It might
> also be related to your gcc- but I'd check the linkscript first.

psim on the CVS head and post 4.6.2 on the 4.6 branch is also supposed
to work for C++.

Look at the bsp_specs as well for crt*.

If you have a simple example, you want tried on another BSP, post it.



-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list