[PATCH v7 1/1] ldconfig: add --install option

Florian Weimer fweimer@redhat.com
Wed Jul 8 15:36:18 GMT 2026


* Andreas K. Huettel:

> Am Mittwoch, 8. Juli 2026, 04:31:23 Japanische Normalzeit schrieb Adhemerval Zanella Netto:
>> 
>> On 07/07/26 16:05, DJ Delorie wrote:
>> > Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> writes:
>> >> On 30/06/26 18:28, DJ Delorie wrote:
>> >>> Add --install option, which copies a pre-built ld.so.cache into place,
>> >>> honoring the cache and root options and defaults.  This gives the user
>> >>> a canonical "correct" way to install a pre-built cache without risk
>> >>> of a program trying to load a partially-written file.
>> >>>
>> >>> Co-authored-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
>> >>
>> >> This version looks good to me, thanks.
>> >>
>> >> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
>> > 
>> > Thanks!
>> > 
>> > I'm assuming this is a post-2.44 patch, yes?
>> > 
>> 
>> It should be doable for 2.44 if Andreas is OK with this.
>> 
>
> It's small, well-separated, and doesnt affect existing operation. So yeah, I
> dont see any problems.
>
> Mostly I don't fully understand the use case yet, but that may be a problem 
> behind *my* keyboard and is irrelevant for the release... 
> Is the source file supposed to come from the live system (since it needs to 
> know all installed libraries)? or from some other magic source?

I think this needs a NEWS entry.  The dynamic linker keeps
/etc/ld.so.cache mapped continuously, so if you use cp to copy the
cache, it's more likely that it will lead to crashes because the size of
the mapping does not match the file contents.

Using ldconfig --install avoids that because doesn't overwrite the file
in place.  Using rsync (without --inplace) or GNU install would be fine,
too.

Thanks,
Florian



More information about the Libc-alpha mailing list