[parisc-linux] gcc (g++) problem
Mon, 25 Feb 2002 19:53:40 -0800 (PST)
As you may remember from my last question, I'm having some problems
building some code on parisc-linux. I have been able to reproduce the
problem using a more simple program.
Here's the problem. This program segfaults when compiled with -fPIC, as
required to build a .so. It is fine when compiled without -fPIC. It is
also fine on intel platform with both. Is there something wrong with the
code that I'm not seeing, or is this a compiler bug? I have tried this
with gcc-3 on an intel box, and it is fine, so I assume it is this port?
Thanks for your help...
g++ -g -o test -fPIC test.cpp
---- test.cpp ----
Foo(const char * const blah);
unsigned char* text;
Foo::Foo(const char * const blah)
text=(unsigned char *)blah;
const Foo test("Blah");
Advertisements contain the only truths to be relied on in a newspaper.
-- Thomas Jefferson