From owner-freebsd-hackers Thu Jan 20 4:43:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from midget.dons.net.au (daniel.lnk.telstra.net [139.130.137.70]) by hub.freebsd.org (Postfix) with ESMTP id DAF2E14D0D for ; Thu, 20 Jan 2000 04:43:24 -0800 (PST) (envelope-from darius@dons.net.au) Received: from guppy.dons.net.au (darius@guppy.dons.net.au [203.31.81.9]) by midget.dons.net.au (8.9.3/8.9.1) with ESMTP id XAA72435; Thu, 20 Jan 2000 23:13:11 +1030 (CST) (envelope-from darius@dons.net.au) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 20 Jan 2000 23:13:10 +1030 (CST) From: "Daniel J. O'Connor" To: Nils M Holm Subject: RE: Force dynamic linking? Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 20-Jan-00 Nils M Holm wrote: > Is there any way to force the creation of dynamically linked executables > using the ELF linker (like 'ld -Bforcedynamic' in the a.out version)? > > I have to link against static libs, but I want to use dlopen() etc. I think you have to link against the libs you need by hand.. (And don't specify -Bstatic).. eg -> gcc foo.o bar.o /usr/local/lib/liba.a -o foo That way you end up with a dynamic executable with no unresolved symbols. (Been here done this ;) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message