This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: dynamically loading libgcj (still) SEGFAULTS
On Mon, Sep 24, 2001 at 12:31:19AM -0400, Jeff Sturm wrote:
>
>
> On Mon, 24 Sep 2001, Johannes Zellner wrote:
> > (gdb) run
> > Starting program: /home/joze/fred
> > dlopen: loaded "libgcjgc.so"
> > dlopen: loaded "libz.so"
> > (no debugging symbols found)...(no debugging symbols found)...(no
> > debugging symbols found)...(no debugging symbols found)...
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x40158182 in GC_mark_from () from /home/joze/local/lib/libgcjgc.so
>
> You really need to link with the shared libgcc, e.g.
>
> gcc -shared-libgcc fred.c -o fred -ldl
>
> Else you end up with two copies of the EH runtime in your process.
> FWIW your test program works fine on my RH 6.2 box.
-shared-libgcc doesn't help here, it still segfaults.
(latest debian, Linux 2.4.9).
btw.: shouldn't libgc.so be linked against libgcjgc.so libz.so, as
libgc apparently depends on these ?
--
Johannes