From owner-freebsd-questions@FreeBSD.ORG Wed Jun 18 07:01:08 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7B7D37B401; Wed, 18 Jun 2003 07:01:08 -0700 (PDT) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id F39B343F85; Wed, 18 Jun 2003 07:01:07 -0700 (PDT) (envelope-from jake@k6.locore.ca) Received: from k6.locore.ca (localhost.locore.ca [127.0.0.1]) by k6.locore.ca (8.12.9/8.12.9) with ESMTP id h5IE1Su3063225; Wed, 18 Jun 2003 10:01:28 -0400 (EDT) (envelope-from jake@k6.locore.ca) Received: (from jake@localhost) by k6.locore.ca (8.12.9/8.12.9/Submit) id h5IE1IjQ063224; Wed, 18 Jun 2003 10:01:18 -0400 (EDT) Date: Wed, 18 Jun 2003 10:01:18 -0400 From: Jake Burkholder To: Joe Kelsey Message-ID: <20030618140118.GA63039@locore.ca> References: <3EEE4717.2090409@mail.flyingcroc.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EEE4717.2090409@mail.flyingcroc.net> User-Agent: Mutt/1.4i cc: stable@freebsd.org cc: questions@freebsd.org Subject: Re: Tools to modify shared libraries X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2003 14:01:09 -0000 Apparently, On Mon, Jun 16, 2003 at 03:39:19PM -0700, Joe Kelsey said words to the effect of; > Has anyone ever come across general-purpose tools for modifying shared > libraries? What I want to do is to edit the list of "needed" shared > libraries to correct the common mistakes that developers make in > creating shared objects with large lists of shared libraries. > > Specifically, I want to modify linux-flashplugin6/libflashplayer.so to > remove all of the idiotic references to shared libraries that the Flash > 6 developers added. Since this is a plugin for Mozilla, it does not > need to specify any extra shared libraries especially since Mozilla has > already loaded all of them! > > I want to do this to make Flash 6 work with flashpluginwrapper. If I > can remove the list of needed shared libraries from the DYNAMIC section > of the shared library, everyone will be that much closer to a real flash > 6 plugin for BSD. I've needed to do similar things to remove the interp section from static binaries with full dynamic symbol tables. I just wrote a C program that mmapped the elf file, parsed the headers and changed the p_type of the PT_INTERP program header entries to PT_NULL. You may be able to do something similar by changing the d_tag of the DT_NEEDED entries to some value larger than DT_COUNT so they will be ignored by the dynamic linker. Jake