On Tuesday, March 13, 2012 12:39:52 Yamaban wrote:
On Tue, 13 Mar 2012 08:32, Marcus Meissner
wrote: On Tue, Mar 13, 2012 at 05:43:49AM +0100, David Haller wrote:
On Tue, 13 Mar 2012, David Haller wrote:
On Tue, 13 Mar 2012, Philipp Thomas wrote:
On Tue, 13 Mar 2012 02:09:58 +0100, Christian Boltz
<snip>
This is actually bad.
You have an empty RPATH ... This means that libraries will searched in the current directory too when you load this module/run this application.
Huh?? Please give a little more info on the reality of what the linker does.
Until now my understanding was that empty and unset RPATH where the same: system-default, no added things.
AFAIK, one had to set RPATH="." to include the current directory, ":" didn't do anything.
Is my knowlegde flawed? Please give enlightment to a poor soul.
Just check the output of these two:: LD_DEBUG=libs LD_LIBRARY_PATH=: ls LD_DEBUG=libs LD_LIBRARY_PATH= ls Marcus, I think you're wrong - check glibc/elf/dl-load.c: /* Ignore empty rpaths. */ if (*copy == 0) { free (copy); sps->dirs = (struct r_search_path_elem **) -1; return false; } I just compiled a simple test program: $ gcc -Wl,-rpath= t.c -lm $ objdump -p ./a.out |grep PATH RPATH RUNPATH aj@byrd:~> LD_DEBUG=libs ./a.out 7933: find library=libm.so.6 [0]; searching 7933: search cache=/etc/ld.so.cache 7933: trying file=/lib64/libm.so.6 7933: 7933: find library=libc.so.6 [0]; searching 7933: search cache=/etc/ld.so.cache 7933: trying file=/lib64/libc.so.6 7933: 7933: 7933: calling init: /lib64/ld-linux-x86-64.so.2 7933: 7933: 7933: calling init: /lib64/libc.so.6 7933: 7933: 7933: calling init: /lib64/libm.so.6 7933: 7933: 7933: initialize program: ./a.out 7933: 7933: 7933: transferring control: ./a.out 7933: s1 = -0.73408150672912598 s2 = -0.73408150672912598 7933: 7933: calling fini: ./a.out [0] 7933: 7933: 7933: calling fini: /lib64/libm.so.6 [0] 7933 So, the empty RPATH is indeed ignored, Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org