New answers tagged dynamic-linking
0
chrpath can’t add an RPATH tag if one isn’t present, and it can’t extend one; as a result, the new path must be of equal length to or shorter than the existing path. Your library started out with a RUNPATH set to ../lib, so chrpath can only replace that with a path of six characters at most.
patchelf doesn’t have that limitation.
1
You can set LD_LIBRARY_PATH for the forked process in execve pointing to a directory with your custom version of foo.so. More about shared libraries and environmental variables that control the loading process here.
Top 50 recent answers are included
Related Tags
dynamic-linking × 241libraries × 52
linux × 49
shared-library × 46
compiling × 23
ld × 18
gcc × 15
elf × 15
linker × 15
debian × 14
glibc × 13
dynamic-loading × 12
static-linking × 10
c × 9
executable × 9
python × 7
environment-variables × 6
openssl × 6
ubuntu × 5
kernel × 5
symlink × 5
permissions × 4
fedora × 4
memory × 4
make × 4