From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA26F3858D37; Mon, 3 Apr 2023 13:47:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA26F3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680529656; bh=fzqvaXSbDweTm8MIY1cg1cqR0zJYbDtNOJzR+eSuYUY=; h=From:To:Subject:Date:From; b=A3nH6vg62JQZ45xvBMVvUZ4evsOk5oGMzC2hriUcmZXdcMpkvH8isyiPoGSz7ptlq 3iZ2SddgzP6eQ6rkmPSxYTKWsthMWrLz3KEgMGG/VKLBYM3f+u44cGbjzwzsDTHX+s vQti5g7EyfShVE752Ct681xJXyo+LU4I6svvYGx0= From: "jason.vas.dias at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/30306] New: ld.so.conf could easily / should support binary specific LD_PATH directory search path settings ? Date: Mon, 03 Apr 2023 13:47:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: jason.vas.dias at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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 Bug ID: 30306 Summary: ld.so.conf could easily / should support binary specific LD_PATH directory search path settings ? Product: glibc Version: unspecified Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: jason.vas.dias at gmail dot com CC: drepper.fsp at gmail dot com Target Milestone: --- I am considering developing a patch to ld.so's ld.so.conf handling=20 that , as well as supporting DIRECTORY lists to add to the effective LD_PATH ($LD_LIBRARY_PATH), could easily also support a new syntax like: /usr/bin/perf:+/usr/local/lib64 to create an EXCEPTION for the /usr/bin/perf program, so that for the specific binary file /usr/bin/perf,=20=20 /usr/local/lib64 would be added to the=20 "effective $LD_LIBRARY_PATH" :=3D LD_PATH=20 (my shorthand). Perhaps an alternative on platforms which support filesystems with extended attributes would be to support files having a 'LD_SO_PATH:' Extended Attribute, which ld.so could support with some new /${DIRECTORY}/:EA_LD_SO_PATH:true setting to enable EA LD_SO_PATH checking for all files under=20 ${DIRECTORY} . This is to solve this problem: https://bugzilla.redhat.com/show_bug.cgi?id=3D2183758 where the linux kernel 'perf' package from v6.2.8 cannot build without the libbpf 0.8.0+ packages, but only v0.7.0 packages come with FC36, so I need to build libbpf-1.1.0-2 into /usr/local/, so it installs its libraries into /usr/local/lib64, then I DO build perf with the ld / gcc '-R /usr/local/lib64' option, but this is=20 conscientiously stripped out of LDFLAGS / from resultant binaries, I don't want to have to patch the binary, so I have to replace /usr/bin/perf with a script :=20 ' !#/bin/bash exec /usr/bin/perf.bin "$@" ', which is not ideal. I think ld.so could provide a most elegant, simple & efficient solution to this problem with support for a tiny extra bit of new configuration syntax - I'd like my ld.so to provide this! --=20 You are receiving this mail because: You are on the CC list for the bug.=