LD_PRELOAD work in progress

Stéphane Graber stgraber at ubuntu.com
Tue Feb 24 23:41:52 UTC 2015


On Tue, Feb 24, 2015 at 06:30:01PM -0500, Michael Terry wrote:
> On Tue, Feb 24, 2015 at 6:06 PM, Stéphane Graber <stgraber at ubuntu.com>
> wrote:
> 
> > So the main problem with the LD_PRELOAD approach and why I discarded it
> > back in CPT is that it will not work for file system access coming from
> > a static binary.
> >
> > So if I write a Go piece of software which opens some file from
> > /usr/share provided by the overlay either in the app itself or one of
> > its frameworks, it won't be able to access the file because it won't be
> > using the local libc.
> >
> 
> Forgive me, I'm a bit out of my usual domain.  Is the problem that with a
> statically linked version of libc, a preloaded library can't override the
> symbols from the libc version already embedded in the executable?  And
> there aren't any tricks to alter that behavior?  That'd be a bummer.
> -mt

That'd be quite correct. A static binary by definition will not use the
linker, so LD_PRELOAD will be of no use.

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150224/7b4a6c8e/attachment-0001.pgp>


More information about the snappy-devel mailing list