From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20061027 Fedora/126.96.36.199-8.fc6 Firefox/188.8.131.52
Description of problem:
According to the ld.so(8) man page you should be able to give the command line option --inhibit-rpath to the dynamic linker to have it ignore the rpath section of a binary. Unfortunately it seems that ld-linux.so chooses to ignore the command line option instead...
This can be demonstrated with the attached test case. The attached archive contains a (slightly) modified version of libtiff. If you run the "runme.sh" script, it will build a test program setting rpath to a small library (libfoo) that loads the modified libtiff. So when I run the test program, the modified libtiff is loaded. Fine.
Then I try with the --inhibit-rpath option, but still libfoo is loaded. I would expect it not be be found.
As a final test I try to inhibit the rpath of my libfoo. Then ld-linux.so.2 segfaults...
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. upnpack the attached archive and run runme.sh
Created attachment 140646 [details]
Sorry, I was mistaken with what should be given to ignore the main program's
RPATH. It is an empty string, not its filename.
So, /lib/ld-linux.so.2 --inhibit-rpath '' ./test
resp. /lib/ld-linux.so.2 --inhibit-rpath :lib1/libfoo.so ./test
inhibit RPATH from ./test resp. ./test and lib1/libfoo.so objects.
The segfault is a bug, I posted a fix today:
Should be fixed in glibc-2.5.90-5 and above in rawhide.