This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/10253] RPATH $ORIGIN breaks if resulting path has colons in it


------- Additional Comments From trick at icculus dot org  2009-06-08 04:53 -------
Created an attachment (id=3987)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=3987&action=view)
Script to reproduce bug

Run the attached script to reproduce.  It'll create a new directory named
rpath-bug, enter it, and compile a small library named libfoo.so and an
executable with RPATH set to '$ORIGIN'.  Then it'll copy the files around to a
couple subdirectories with or without colons, showing results of ldd etc.

Here's the output I get when running the script in /tmp:

=== /tmp/rpath-bug ===
* ls:		      
foo.c  libfoo.so  test	test.c	this  this:breaks:rpath
* ./test:					       
* objdump -x test | grep RPATH: 		       
  RPATH 	       $ORIGIN			       
* ldd test:					       
	linux-vdso.so.1 =>  (0x00007fff3e1fe000)       
	libfoo.so => /tmp/rpath-bug/libfoo.so (0x00007fd535c83000)
	libc.so.6 => /lib/libc.so.6 (0x00007fd53592e000)	  
	/lib/ld-linux-x86-64.so.2 (0x00007fd535e84000)		  

=== /tmp/rpath-bug/this:breaks:rpath ===
* ls:					
libfoo.so  subdir  test 		
* ./test:				
./test: error while loading shared libraries: libfoo.so: cannot open shared
object file: No such file or directory
* objdump -x test | grep RPATH: 					       
				  
  RPATH 	       $ORIGIN						       
				  
* ldd test:								       
				  
	linux-vdso.so.1 =>  (0x00007fffff7ff000)			       
				  
	libfoo.so => not found						       
				  
	libc.so.6 => /lib/libc.so.6 (0x00007f13f70ef000)		       
				  
	/lib/ld-linux-x86-64.so.2 (0x00007f13f7444000)			       
				  

=== /tmp/rpath-bug/this:breaks:rpath/subdir ===
* ls:					       
libfoo.so  test 			       
* ./test:				       
./test: error while loading shared libraries: libfoo.so: cannot open shared
object file: No such file or directory
* objdump -x test | grep RPATH: 					       
				  
  RPATH 	       $ORIGIN						       
				  
* ldd test:								       
				  
	linux-vdso.so.1 =>  (0x00007ffff23fe000)			       
				  
	libfoo.so => not found						       
				  
	libc.so.6 => /lib/libc.so.6 (0x00007ff9e9dbd000)		       
				  
	/lib/ld-linux-x86-64.so.2 (0x00007ff9ea112000)

* back to this:breaks:rpath

«libfoo.so» -> «breaks/libfoo.so»

=== /tmp/rpath-bug/this:breaks:rpath ===
* ls:
breaks	libfoo.so  subdir  test
* ./test:
* objdump -x test | grep RPATH:
  RPATH 	       $ORIGIN
* ldd test:
	linux-vdso.so.1 =>  (0x00007fffb91ff000)
	libfoo.so => breaks/libfoo.so (0x00007fd3b0d5c000)
	libc.so.6 => /lib/libc.so.6 (0x00007fd3b0a07000)
	/lib/ld-linux-x86-64.so.2 (0x00007fd3b0f5d000)

«libfoo.so» -> «../this/libfoo.so»

=== /tmp/rpath-bug/this:breaks:rpath ===
* ls:
breaks	libfoo.so  subdir  test
* ./test:
* objdump -x test | grep RPATH:
  RPATH 	       $ORIGIN
* ldd test:
	linux-vdso.so.1 =>  (0x00007fff00bfe000)
	libfoo.so => /tmp/rpath-bug/this/libfoo.so (0x00007f51f87d0000)
	libc.so.6 => /lib/libc.so.6 (0x00007f51f847b000)
	/lib/ld-linux-x86-64.so.2 (0x00007f51f89d1000)

=== /tmp/rpath-bug/this:breaks:rpath/subdir ===
* ls:
libfoo.so  test
* ./test:
* objdump -x test | grep RPATH:
  RPATH 	       $ORIGIN
* ldd test:
	linux-vdso.so.1 =>  (0x00007fffb11ff000)
	libfoo.so => /tmp/rpath-bug/this/libfoo.so (0x00007f71a8c42000)
	libc.so.6 => /lib/libc.so.6 (0x00007f71a88ed000)
	/lib/ld-linux-x86-64.so.2 (0x00007f71a8e43000)


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]