From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1KlNFT-0005Oh-C3 for garchives@archives.gentoo.org; Thu, 02 Oct 2008 12:25:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BCCBE02EA; Thu, 2 Oct 2008 12:25:38 +0000 (UTC) Received: from imo-m19.mx.aol.com (imo-m19.mx.aol.com [64.12.137.11]) by pigeon.gentoo.org (Postfix) with ESMTP id 4FFC6E02EA for ; Thu, 2 Oct 2008 12:25:38 +0000 (UTC) Received: from bzk0711@aim.com by imo-m19.mx.aol.com (mail_out_v39.1.) id 5.d6b.36c78b81 (37072) for ; Thu, 2 Oct 2008 08:25:33 -0400 (EDT) Received: from silencio.saunaklub (p50894e47.dip.t-dialin.net [80.137.78.71]) by cia-db05.mx.aol.com (v121_r2.11) with ESMTP id MAILCIADB056-90d048e4bdbb31c; Thu, 02 Oct 2008 08:25:32 -0400 Date: Thu, 2 Oct 2008 14:19:28 +0200 From: To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] "prelink" a dynamic library Message-ID: <20081002141928.2713fd90@silencio.saunaklub> In-Reply-To: References: X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AOL-IP: 80.137.78.71 X-Spam-Flag:NO X-Archives-Salt: 17449764-a539-4680-bc8f-52ea2e6f9e68 X-Archives-Hash: e40fb3caabbd1942050f48e2eb7735ac On Wed, 01 Oct 2008 18:53:04 +0200 (CEST) Helmut Jarausch wrote: > Hi, Hello Helmut, > I want to create a shared library, say libULIB.so, > which needs additional shared libraries, e.g. libmpfr.so and > libgmp.so . > > My users only use the functions provided by libULIB.so. > > Is there a means to "prelink" libULIB.so, so that the libraries > libmpfr.so and libgmp.so are not needed by the user? You should be able to just provide the libraries to the linker when linking your shared object. When *running* the application, your shared object (i.e. the loader) should transitively pull in the libs on which yours depends. You can check those dependencies using ldd . Hope this helps, Patric