Date: Wed, 03 Apr 1996 08:51:39 -0800 From: John Polstra <jdp@polstra.com> To: bdodson@beowulf.utmb.edu Cc: freebsd-ports@freebsd.org Subject: Re: Need ld help on SOCKS5 port Message-ID: <199604031651.IAA04672@austin.polstra.com> In-Reply-To: <199604031506.JAA11720@beowulf.utmb.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
Bud Dodson writes: > gcc -o libsocks5_sh.so -shared msg.so protocol.so ... -lcompat > ... > ld: No reference to __DYNAMIC > *** Error code 1 > ... > I grepped all the files in the main and subdirectories for DYNAMIC, > with no hits so I'm assuming this has something to do with the > construction of shared libraries on FBSD. Man pages for ld and > gcc were no help. Can someone with knowledge of the internal > structure of shared objects give me a hint? On FreeBSD, you build a shared library like this: ld -Bshareable -o libsocks5_sh.so.1.0 msg.so protocol.so ... -lcompat Just use "ld -Bshareable" in place of "gcc -shared". (I also added major and minor version numbers to the name of your output file.) In my opinion, it's a bug that "gcc -shared" doesn't work. But nobody (including me) has ever bothered to fix that. -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604031651.IAA04672>