From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 857893858D32; Wed, 12 Apr 2023 17:59:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 857893858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681322351; bh=1xPugjfJw5wNMEIK/O+BXJtakJaTnIjSaIFsPnGn1OA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jkNqjMciDXCk4A6jxngRI0eo9U+OdhR7IpWp5nhcwYb5iVpOuO1NtEdH5ugAM1L3O ealBEacsLLatioZnR34MzjSWlEkNwz39z/hryTICOTZrErHq7gjlf4hTtXwajTfVkJ glSma+qbLa6e3C+bl1Cte1Gg15zisUUI069ZRXOk= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/30306] ld.so.conf could easily / should support binary specific LD_PATH directory search path settings ? Date: Wed, 12 Apr 2023 17:59:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30306 Adhemerval Zanella changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adhemerval.zanella at lina= ro dot o | |rg --- Comment #4 from Adhemerval Zanella --- (In reply to Jason Vas Dias from comment #3) > RE: Comment #2:=20 > > Why can't you just add /usr/local/lib64 unconditionally to /etc/ld.so.c= onf? >=20 > Thanks, Andreas -=20 >=20 > Because there may be many other libraries in /usr/local/lib64 - in fact, > there is a libgcc-shared.so and a libstdc++.so.6 in /usr/local/lib64, > which I'd rather not pick up at all - I want to be able to move > libbpf's libraries to some /usr/local/libbpf-v1.1.0/lib64 directory , > and specify that they apply ONLY to links needed for /usr/bin/perf, > I do NOT want these updated libbpf* links to update the system > libbpf at all, which MUST remain at v0.7.0, else everything that > uses libbpf (except perf) will break . >=20 > It just seems to me that having some very simple extra config > in ld.so.conf, to apply a LD_PATH only to certain executables, > would prevent a whole host of error prone disasters involved=20 > with binary patching in of a DT_RUNPATH ELF note . We already have RPATH, which has precedence over the loader cache and it is= not subject to DF_1_NODEFLIB. RPATH also accepts $ORIGIN, which does not tie w= here the binary is installed; and it is also simpler to use since do not need ad= min credential (to update ld.so.config and run ldconfig). I don't have a strong opinion, but this seems to just replicate a subset of RPATH and it will add an extra complexity on loader cache (which will need = to keep track of whether the entry has a path associated, and add a new type to handle the directory suggestion).=20=20 It also adds some corner cases:=20 - should it just support ET_EXEC?=20 - For ET_DYN, should it tie to the filesystem name or with its SONAME?=20 - The LD_LIBRARY_PATH is handled earlier than the cache and it is not sub= ject to DF_1_NODEFLIB, however your suggestion ties with LD_LIBRARY_PATH. So I am not sure if this will be really an improvement. --=20 You are receiving this mail because: You are on the CC list for the bug.=