Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2003 10:01:18 -0400
From:      Jake Burkholder <jake@locore.ca>
To:        Joe Kelsey <joek@mail.flyingcroc.net>
Cc:        questions@freebsd.org
Subject:   Re: Tools to modify shared libraries
Message-ID:  <20030618140118.GA63039@locore.ca>
In-Reply-To: <3EEE4717.2090409@mail.flyingcroc.net>
References:  <3EEE4717.2090409@mail.flyingcroc.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030618140118.GA63039>