[rtems-users] C++ Virtual Functions

gregory.menke at gsfc.nasa.gov gregory.menke at gsfc.nasa.gov
Tue Feb 1 21:00:53 UTC 2005


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.

Gregm





More information about the users mailing list