Date: Tue, 29 Jul 1997 21:54:15 -0400 (EDT) From: Chuck Robey <chuckr@glue.umd.edu> To: "Alex.Boisvert" <boia01@pollux.GEL.USherb.CA> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Almost JDK 1.1.2 port! Message-ID: <Pine.BSF.3.96.970729214726.280D-100000@Journey2.mat.net> In-Reply-To: <Pine.SOL.3.91.970729185524.14114A-100000@pollux>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 29 Jul 1997, Alex.Boisvert wrote: > > (This is a repost since I haven't got any response from first post) > > Hello all hackers - > > I'm almost done with a native port of JDK 1.1.2 to FreeBSD and > I am having a few difficulties with dynamic libraries. (Yes, that's ld.so > stuff) > > The java virtual machine (java_g) gets a segmentation fault when going > through the _GLOBAL_OFFSET_TABLE_ to execute a function in a dynamic > library (in this case, libawt_g.so). > > The libawt_g.so library is loaded via a dlopen() call. In gdb, I get the > following output after the library is loaded and the VM crashed: If you don't get a reply, it means no one who's reading knows for sure. It's not terrifically hard to write a short program to verify that you can dlopen and dlsym the symbols, or report the error that dlerror returns. Or use gdb to catch your program as it's reading the symbols in, and make sure they aren't returning NULL (the error condition). What mode are you using for the calls, RTLD_LAZY or RTLD_NOW? Maybe you should change that? > > ---- cut here ----- > > Program received signal SIGSEGV, Segmentation fault. > 0x0 in ?? () > (gdb) info sharedlibrary > From To Syms Read Shared Object Library > 0x0807a000 0x0808a000 Yes /usr/libexec/ld.so > 0x08091000 0x080ab000 Yes /usr/lib/libm.so.2.0 > 0x080aa000 0x081a5434 Yes /usr/X11R6/lib/libXm.so.1.2 > 0x081a5000 0x081e7000 Yes /usr/X11R6/lib/libXt.so.6.0 > 0x081e6000 0x081f0000 Yes /usr/X11R6/lib/libXext.so.6.1 > 0x081ef000 0x082851a0 Yes /usr/X11R6/lib/libX11.so.6.1 > 0x08285000 0x082ef710 Yes /usr/lib/libc.so.3.0 > 0x09403000 0x0946552c No > /home/alex/jdk/javasrc/build/lib/i386/green_threads/libawt_g.so > (gdb) > > ------ cut here ------ > > Notice the "No" for libawt_g.so in the column "Syms Read". What does > this mean??? > > Have I forgotten to do something after dlopen()? > > Regards, > Alex. > > PS: I am using dlsym() to get the address of the function. > > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic, both FreeBSD (301) 220-2114 | version 3.0 current -- and great FUN! ----------------------------+-----------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970729214726.280D-100000>