From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13894 invoked by alias); 31 Jul 2008 17:03:48 -0000 Received: (qmail 13886 invoked by uid 22791); 31 Jul 2008 17:03:47 -0000 X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 Jul 2008 17:03:13 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KObYV-0006Pa-4o for gcc-help@gcc.gnu.org; Thu, 31 Jul 2008 10:03:11 -0700 Message-ID: <18759076.post@talk.nabble.com> Date: Thu, 31 Jul 2008 17:15:00 -0000 From: eoin To: gcc-help@gcc.gnu.org Subject: Re: gcc the gnu linker and the -z extract option In-Reply-To: <18635245.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: eoin.mcquillan@btinternet.com References: <18635245.post@talk.nabble.com> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-07/txt/msg00330.txt.bz2 Ok - I now know better what I want to do. Basically using gcc I want to statically link a number of .as to a shared object and dynamically link the rest. In Solaris I do -h -z muldefs -z allextract -Bstatic -Bdynamic In gcc what I'm trying is -shared (I require this option due to a few other things) -z muldefs -static -shared This however does not statically link the archives into the shared object(acccording to ldd). Any ideas? Thanks eoin wrote: > > Hi, > I'm a new poster here. I am porting some Solaris code over to Linux > and using the GNU compiler and linker. Now I have a "meta > library"(creating a "master" shared object from mayny shared objects) > which creates fine in Solaris but in Linux it doesn't create as a meta > library - ldd suggests that it depends on the libraries which were > previously used to produce the meta library on solaris. > Looking into this I can see that with every .so we effectively lose > the identity and so with a metalibrary what we need to do is to "unravel" > the .sos to produce the meta library. > I do this in Solaris using the -z extract option. I can't see how to > do this in Linux using the GNU linker. Anyone any ideas? > > Thanks > -- View this message in context: http://www.nabble.com/gcc-the-gnu-linker-and-the--z-extract-option-tp18635245p18759076.html Sent from the gcc - Help mailing list archive at Nabble.com.