This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: _impure_ptr ??
>>>>> "Gary" == Gary D Thomas <gary dot thomas at mind dot be> writes:
Gary> On Mon, 2003-03-24 at 14:26, Bart Veer wrote:
>> >>>>> "Bob" == Bob Koninckx <bob dot koninckx at mech dot kuleuven dot ac dot be> writes:
>>
Bob> This redefinition of __xca_pure_virtual seems to solve the
Bob> problem. No more link errors, application runs fins.
Bob> Apparently, the compiler pulls this function in as soon as
Bob> you have at least one pure virtual function in your
Bob> application.
>>
>> I have now reproduced this. Using a pure virtual function used to pull
>> in a function __pure_virtual_called() or something like that, which
>> was provided by libgcc.a and just aborted the application. That could
>> happen if somehow you managed to call a virtual function while the
>> base object was still being constructed, before the derived class
>> constructor had updated the virtual function table. Nowadays it
>> pulls in a more complicated __cxa_pure_virtual() from
>> libstdc++-v3/libsup++/pure.cc which has additional library
>> dependencies, unwanted ones in an eCos setup.
>>
>> I think we want to put our own dummy __cxa_pure_virtual() into
>> CYGPKG_HAL or CYGPKG_INFRA. Jifl, any preferences ?
Gary> If this is PowerPC only, then it goes in the HAL. If it is
Gary> common to all versions of GCC, then I would think INFRA.
It is target-independent - I reproduced it using an arm-elf toolchain.
There are precedents for putting it into CYGPKG_INFRA, e.g. memcpy().
However that was done before we had a common HAL package, CYGPKG_HAL.
I think there is actually an argument for moving memcpy() and
memmove() to the common HAL, leaving infra containing
assert/trace/testing support. That reasoning would place
__cxa_pure_virtual() in the common HAL as well.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss