Date: Sun, 27 Mar 2011 00:31:18 +0100 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Jim <stapleton.41@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: opening a shared object / failing with Undefined Symbol. Message-ID: <AANLkTinSvV-Rt5tWBJASyFcpgHE6gEp8tOp73N4y1MYW@mail.gmail.com> In-Reply-To: <AANLkTi=tyuVJBDN7qRLe7O_a3i3d09sbEis-zoCH14tY@mail.gmail.com> References: <AANLkTi=tyuVJBDN7qRLe7O_a3i3d09sbEis-zoCH14tY@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 22, 2011 at 2:28 PM, Jim <stapleton.41@gmail.com> wrote: > I have an application that opens two .so files with dlopen(3): > =C2=A0/usr/local/lib/libag_core.so > =C2=A0/usr/local/lib/libag_gui.so > > Both files exist > Running nm(1) against each produces a lot of output, showing all the > symbols I know to exist in each library. > > My application gets a null return from dlopen on the libag_gui.so. > > dlerror produces the following string: > =C2=A0"/usr/local/lib/libag_gui.so Undefined symbol "agTimingLock" > > $ nm /usr/local/lib/libag_gui.so | grep agTiming > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 U agTimingLock > > I'm guessing that means that agTimingLock is used in that library but > not defined? > > $ nm /usr/local/lib/libag_core.so | grep agTiming > 0000000000141c00 B agTimingLock > > And this would mean that it is defined in libag_core.so? Yes, but it's in the uninitialized data section: % man nm ... "B" "b" The symbol is in the uninitialized data section (known as BS= S). What is the "ag" library? Which version are you using? What sort of dlopen() call did you try to run?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinSvV-Rt5tWBJASyFcpgHE6gEp8tOp73N4y1MYW>