public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN
@ 2014-08-10 17:00 bpshacklett at gmail dot com
2014-08-10 17:10 ` [Bug dynamic-link/17251] " bpshacklett at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: bpshacklett at gmail dot com @ 2014-08-10 17:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
Bug ID: 17251
Summary: RPATH of shared libraries doesn't follow symlinks for
$ORIGIN
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: bpshacklett at gmail dot com
t
I'm not 100% sure if this a bug or intended behavior, I can't find any evidence
for either argument.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug dynamic-link/17251] RPATH of shared libraries doesn't follow symlinks for $ORIGIN
2014-08-10 17:00 [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN bpshacklett at gmail dot com
@ 2014-08-10 17:10 ` bpshacklett at gmail dot com
2014-08-12 4:25 ` bpshacklett at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bpshacklett at gmail dot com @ 2014-08-10 17:10 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
--- Comment #1 from Brennan Shacklett <bpshacklett at gmail dot com> ---
Oops, sorry for the empty description, firefox decided to submit the form when
I hit enter.
The issue is that if a shared library has $ORIGIN in its RPATH, $ORIGIN is not
calculated as the real path of the library.
This can easily be shown with two shared libraries and a symlink:
libone.so and libtwo.so are both in a directory named ~/lib
libone.so needs libtwo.so, and has an RPATH of "$ORIGIN" so libtwo.so can be
found.
If I cd into ~/lib and run ldd on libone.so, libtwo.so is found.
If I create a symlink from ~/libone.so to ~/lib/libone.so, and run ldd on the
symlink at ~/libone.so, libtwo.so can no longer be found because $ORIGIN is not
calculated as ~ rather than ~/lib
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug dynamic-link/17251] RPATH of shared libraries doesn't follow symlinks for $ORIGIN
2014-08-10 17:00 [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN bpshacklett at gmail dot com
2014-08-10 17:10 ` [Bug dynamic-link/17251] " bpshacklett at gmail dot com
@ 2014-08-12 4:25 ` bpshacklett at gmail dot com
2014-08-12 16:05 ` bpshacklett at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bpshacklett at gmail dot com @ 2014-08-12 4:25 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
--- Comment #2 from Brennan Shacklett <bpshacklett at gmail dot com> ---
s/is not calculated/is calculated/ in the last sentence.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug dynamic-link/17251] RPATH of shared libraries doesn't follow symlinks for $ORIGIN
2014-08-10 17:00 [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN bpshacklett at gmail dot com
2014-08-10 17:10 ` [Bug dynamic-link/17251] " bpshacklett at gmail dot com
2014-08-12 4:25 ` bpshacklett at gmail dot com
@ 2014-08-12 16:05 ` bpshacklett at gmail dot com
2014-08-14 12:47 ` fweimer at redhat dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bpshacklett at gmail dot com @ 2014-08-12 16:05 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
--- Comment #3 from Brennan Shacklett <bpshacklett at gmail dot com> ---
Created attachment 7744
--> https://sourceware.org/bugzilla/attachment.cgi?id=7744&action=edit
Patch to switch $ORIGIN to be calculated based on absolute path
This patch fixes the behavior for me, I'll also post it to the mailing list
with an explanation.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug dynamic-link/17251] RPATH of shared libraries doesn't follow symlinks for $ORIGIN
2014-08-10 17:00 [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN bpshacklett at gmail dot com
` (2 preceding siblings ...)
2014-08-12 16:05 ` bpshacklett at gmail dot com
@ 2014-08-14 12:47 ` fweimer at redhat dot com
2014-08-14 15:59 ` bpshacklett at gmail dot com
2014-08-18 15:28 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-08-14 12:47 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
I'm not sure if you can use __realpath from the dynamic linker. And PATH_MAX
could be too small; the __realpath function with a non-NULL second argument is
basically broken.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug dynamic-link/17251] RPATH of shared libraries doesn't follow symlinks for $ORIGIN
2014-08-10 17:00 [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN bpshacklett at gmail dot com
` (3 preceding siblings ...)
2014-08-14 12:47 ` fweimer at redhat dot com
@ 2014-08-14 15:59 ` bpshacklett at gmail dot com
2014-08-18 15:28 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: bpshacklett at gmail dot com @ 2014-08-14 15:59 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
--- Comment #5 from Brennan Shacklett <bpshacklett at gmail dot com> ---
Well I defined __realpath in dl-realpath.c and included that into
rtld-routines, doesn't that allow the linker to use it?
I'm not sure what you mean about __realpath being broken with a non null 2nd
argument, the version which I defined in dl-realpath doesn't even handle a NULL
second argument (I didn't think it was necessary). Are you saying I should
rewrite the dl-realpath version to handle that NULL and dynamically allocate
its own memory?
There is a more detailed explanation in my mailing list post here:
https://sourceware.org/ml/libc-alpha/2014-08/msg00160.html if you want more
details.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug dynamic-link/17251] RPATH of shared libraries doesn't follow symlinks for $ORIGIN
2014-08-10 17:00 [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN bpshacklett at gmail dot com
` (4 preceding siblings ...)
2014-08-14 15:59 ` bpshacklett at gmail dot com
@ 2014-08-18 15:28 ` fweimer at redhat dot com
5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-08-18 15:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=17251
--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Brennan Shacklett from comment #5)
> Well I defined __realpath in dl-realpath.c and included that into
> rtld-routines, doesn't that allow the linker to use it?
Ah, I missed the reimplementation. I'll post further questions to the mailing
list.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-08-18 15:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-10 17:00 [Bug dynamic-link/17251] New: RPATH of shared libraries doesn't follow symlinks for $ORIGIN bpshacklett at gmail dot com
2014-08-10 17:10 ` [Bug dynamic-link/17251] " bpshacklett at gmail dot com
2014-08-12 4:25 ` bpshacklett at gmail dot com
2014-08-12 16:05 ` bpshacklett at gmail dot com
2014-08-14 12:47 ` fweimer at redhat dot com
2014-08-14 15:59 ` bpshacklett at gmail dot com
2014-08-18 15:28 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).