Y
Hacker News
new
|
ask
|
show
|
jobs
by
nly
1150 days ago
You can compile binaries with additional relative library paths in to them that will take priority over /usr/lib64
1 comments
josephg
1150 days ago
How? Maybe this should be better documented & recommended. I suppose at some point you're just statically linking with more steps - though for a problem like this it might be worth it.
link
xioxox
1150 days ago
See the ELF rpath, which can be set by the linker. This can be modified after using patchelf.
link
yrro
1149 days ago
https://sourceware.org/binutils/docs-2.40/ld/Options.html#in...
link
ywei3410
1149 days ago
The other comments have already covered the how, but I'd like to add that the mechanism used extensively in Nix [1].
[1]
https://nixos.org/
link
rkeene2
1150 days ago
$ORIGIN has been pretty well-known and documented for a very long time
link