[uClibc]more errors doing C++ with uClibc
Erik Andersen
andersen at lineo.com
Tue Aug 28 17:16:45 UTC 2001
On Tue Aug 28, 2001 at 07:08:51PM +0200, Fabio Parodi wrote:
> The following code produces a segmentation fault when linked with uClibc:
>
> #include "stdio.h"
> class A {
> public: virtual void hello() { printf("hello from A\n"); };
> };
> A g;
> void main() {
> A *a;
> g.hello(); // this works because the compiler knows A::hello()
> a = &g;
> a->hello(); // this does not work
> }
>
> I suppose there is something with static object initialization.
> Is there anybody with the same problem?
What arch are you on? x86? Basically for each arch,
there is some stuff needed in crt0 to make global
constructors and destructors work. Could you try again
with the stuff I just checked in?
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list