public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/30306] New: ld.so.conf could easily / should support binary specific LD_PATH directory search path settings ?
@ 2023-04-03 13:47 jason.vas.dias at gmail dot com
  2023-04-03 13:57 ` [Bug libc/30306] " jason.vas.dias at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jason.vas.dias at gmail dot com @ 2023-04-03 13:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30306

            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 
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,  
/usr/local/lib64 would be added to the 
"effective $LD_LIBRARY_PATH" := LD_PATH 
(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 
${DIRECTORY} .

This is to solve this problem:
 https://bugzilla.redhat.com/show_bug.cgi?id=2183758
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 
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 : 
'
!#/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!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-12 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 13:47 [Bug libc/30306] New: ld.so.conf could easily / should support binary specific LD_PATH directory search path settings ? jason.vas.dias at gmail dot com
2023-04-03 13:57 ` [Bug libc/30306] " jason.vas.dias at gmail dot com
2023-04-03 16:41 ` schwab@linux-m68k.org
2023-04-03 19:09 ` jason.vas.dias at gmail dot com
2023-04-12 17:59 ` adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).