This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Static binary, .so plugins that are static too - can it be done
- To: bert hubert <ahu at ds9a dot nl>
- Subject: Re: Static binary, .so plugins that are static too - can it be done
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Sun, 29 Jul 2001 18:08:02 +0930
- Cc: binutils at sourceware dot cygnus dot com
- References: <20010728184544.B29828@home.ds9a.nl>
On Sat, Jul 28, 2001 at 06:45:44PM +0200, bert hubert wrote:
> 1) does a 'static shared library' even exist?
> It might be possible to have such a library link in
> everything statically?
You could arrange for your modules to load at fixed addresses. Use
jump tables to call functions and tables of pointers to access variables.
Messy but workable. Linux aout shared libs used this scheme.
> 2) If I reduce the .so's dependencies to just ld-linux.so, which
> would then come from an older glibc, would that work? The .so
> would then not link in libc and libm, but 'get' the functions
> from the static binary?
Yes, you could link your modules against static libc.