Bug 214569 - command line option --inhibit-rpath to ld-linux.so.2 doesn't work
Summary: command line option --inhibit-rpath to ld-linux.so.2 doesn't work
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 6
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-08 12:48 UTC by David Juran
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 2.5.90-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-11-11 08:53:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
test case (239.89 KB, application/x-bzip)
2006-11-08 12:49 UTC, David Juran
no flags Details

Description David Juran 2006-11-08 12:48:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20061027 Fedora/1.5.0.7-8.fc6 Firefox/1.5.0.7

Description of problem:
Hello.

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):
glibc-2.5-3

How reproducible:
Always


Steps to Reproduce:
1. upnpack the attached archive and run runme.sh


Actual Results:


Expected Results:


Additional info:

Comment 1 David Juran 2006-11-08 12:49:52 UTC
Created attachment 140646 [details]
test case

Comment 2 Jakub Jelinek 2006-11-08 15:30:47 UTC
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:
http://sources.redhat.com/ml/libc-hacker/2006-11/msg00003.html

Comment 3 Jakub Jelinek 2006-11-11 08:53:39 UTC
Should be fixed in glibc-2.5.90-5 and above in rawhide.


Note You need to log in before you can comment on or make changes to this bug.