This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] ld.so: command argument "--preload"
- From: Florian Weimer <fweimer at redhat dot com>
- To: David Newall <glibc at davidnewall dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 24 Oct 2018 12:54:58 +0200
- Subject: Re: [PATCH] ld.so: command argument "--preload"
- References: <322fb70a-9c0e-100b-4366-dfa7e5134aa5@davidnewall.com> <265bec63-9875-7268-2199-c7e133b2298e@davidnewall.com>
* David Newall:
> I worked around a deficiency in a 3rd party binary, via LD_PRELOAD,
> however any sub-process invoked by that binary tried (as advertised) to
> load the library, too. When I needed to run the (32-bit) binary under a
> 64-bit OS, I found that the sub-processes worked, but elicited an ugly
> error about wrong ELF class. What I needed was a way of preloading a
> library for only the binary that I was executing, and not for any
> sub-process (e.g. executed via system(3)).
>
> I feel that a --preload argument is a minor change on top of which the
> LD_PRELOAD environment variable should be built. That is, there should
> be a way to preload a library without it propagating to all
> sub-processes.
For some reason, the patch as posted does not apply to master.
I think the general approach of the patch is fine. Could you write a
test case for it?
Thanks,
Florian