From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 21:00:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D919E16A4CE for ; Fri, 9 Jan 2004 21:00:33 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B90743D4C for ; Fri, 9 Jan 2004 21:00:33 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 2F2E95C7B0; Fri, 9 Jan 2004 21:00:33 -0800 (PST) Date: Fri, 9 Jan 2004 21:00:33 -0800 From: Alfred Perlstein To: hackers@freebsd.org Message-ID: <20040110050033.GP9623@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: help with linking please X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2004 05:00:34 -0000 This is driving me insane... I would like to provide a client with a .o file so that he can link static against my library. Unfortunatly I need to hide nearly all the symbols in my object file. For a shared object this works out super easy, all I do is generate the .so file, then run strip -N on each symbol I want to nuke. I'm having a hell of a time doing this so I can produce a static .o or .a with most of the symbols stripped. Two problems seem to be that even if I use "ld -r -o main.o obj1.o obj2.c libfoo.a" then I can not strip symbols in obj1.o that are referenced from obj2.o even after I combine the object files. Any hints? -- - Alfred Perlstein - Research Engineering Development Inc. - email: bright@mu.org cell: 408-480-4684