public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version
@ 2011-07-09 5:33 ian at airs dot com
2012-01-09 9:00 ` [Bug libc/12977] " jrnieder at gmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: ian at airs dot com @ 2011-07-09 5:33 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12977
Summary: glibc dynamic linker behaves unpredictable when using
base version
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: ian@airs.com
Created attachment 5840
--> http://sourceware.org/bugzilla/attachment.cgi?id=5840
Test case
The glibc dynamic linker behaves unpredictably when asked to look up a symbol
in the base version.
The GNU linker manual says:
__asm__(".symver original_foo,foo@@");
foo@@ represents the symbol foo bound to the unspecified base version of
the symbol.
The apparent intent is to support changing a library from having no versions to
one having versions. The idea is to put the oldest version of the symbol into
the base version, and then to add new symbols to later versions. Executables
which have no version for the symbol should then presumably link against the
base version.
However, because the glibc dynamic linker behaves unpredictably, this behaviour
is useless.
I have attached a test case. The tests ver_test_12 and ver_test_13 are
identical except for the name of the function. The function is named 't1' in
ver_test_12 and 'f1' in ver_test_13. When I run "make", ver_test_12 fails and
ver_test_13 passes. I've gotten this result on Ubuntu Lucid using eglibc
2.11.1 and on Fedora Core 14 using glibc 2.13. I used the default GNU ld in
both cases.
Currently the gold linker rejects this usage because the behaviour is
unpredictable. Using gold instead of GNU ld for the test case will give an
error building ver_test_12b.so or ver_test_13b.so:
ld: error: symbol t1 has undefined version
However, the developers of the FUSE library are protesting, saying that the
behaviour is documented in the GNU ld manual, and that it does happen to work
for them.
The unpredictable behaviour occurs because of how check_match nested within
do_lookup_x in elf/dl-lookup.c handles symbols with no versions. The behaviour
depends on the order in which the symbols are seen in the hash table.
In order to know what the linkers should do in this case, I think we need to
understand what the glibc developers believe is the correct behaviour here. Is
the current behaviour a bug which should be fixed in glibc? Or is gold correct
in refusing to create a shared library like this?
There is some additional background at
http://sourceforge.net/mailarchive/forum.php?thread_name=m3wrq48tso.fsf%40pepe.airs.com&forum_name=fuse-devel
http://sourceware.org/bugzilla/show_bug.cgi?id=12261
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libc/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
@ 2012-01-09 9:00 ` jrnieder at gmail dot com
2012-02-21 2:17 ` [Bug ld.so|libdl/12977] " jsm28 at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jrnieder at gmail dot com @ 2012-01-09 9:00 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12977
Jonathan Nieder <jrnieder at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jrnieder at gmail dot com
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug ld.so|libdl/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
2012-01-09 9:00 ` [Bug libc/12977] " jrnieder at gmail dot com
@ 2012-02-21 2:17 ` jsm28 at gcc dot gnu.org
2012-03-25 5:30 ` [Bug dynamic-link/12977] " devurandom at gmx dot net
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-02-21 2:17 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12977
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libc |ld.so|libdl
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug dynamic-link/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
2012-01-09 9:00 ` [Bug libc/12977] " jrnieder at gmail dot com
2012-02-21 2:17 ` [Bug ld.so|libdl/12977] " jsm28 at gcc dot gnu.org
@ 2012-03-25 5:30 ` devurandom at gmx dot net
2012-03-26 10:19 ` ppluzhnikov at google dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: devurandom at gmx dot net @ 2012-03-25 5:30 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12977
devurandom at gmx dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |devurandom at gmx dot net
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug dynamic-link/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
` (2 preceding siblings ...)
2012-03-25 5:30 ` [Bug dynamic-link/12977] " devurandom at gmx dot net
@ 2012-03-26 10:19 ` ppluzhnikov at google dot com
2012-03-30 7:28 ` naesten at gmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ppluzhnikov at google dot com @ 2012-03-26 10:19 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12977
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot
| |com
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug dynamic-link/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
` (3 preceding siblings ...)
2012-03-26 10:19 ` ppluzhnikov at google dot com
@ 2012-03-30 7:28 ` naesten at gmail dot com
2012-05-13 23:58 ` jrnieder at gmail dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: naesten at gmail dot com @ 2012-03-30 7:28 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12977
Samuel Bronson <naesten at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |naesten at gmail dot com
Version|unspecified |2.13
Blocks| |12261
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug dynamic-link/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
` (4 preceding siblings ...)
2012-03-30 7:28 ` naesten at gmail dot com
@ 2012-05-13 23:58 ` jrnieder at gmail dot com
2014-06-23 19:29 ` david.heidelberger at ixit dot cz
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jrnieder at gmail dot com @ 2012-05-13 23:58 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12977
Jonathan Nieder <jrnieder at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|drepper.fsp at gmail dot |unassigned at sourceware
|com |dot org
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug dynamic-link/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
` (5 preceding siblings ...)
2012-05-13 23:58 ` jrnieder at gmail dot com
@ 2014-06-23 19:29 ` david.heidelberger at ixit dot cz
2014-06-27 12:57 ` fweimer at redhat dot com
2014-06-28 5:56 ` naesten at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: david.heidelberger at ixit dot cz @ 2014-06-23 19:29 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=12977
David Heidelberger (okias) <david.heidelberger at ixit dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david.heidelberger at ixit dot cz
--- Comment #1 from David Heidelberger (okias) <david.heidelberger at ixit dot cz> ---
Actual status of bug?
Berkeley DB still fails with
checking whether the C compiler works... no
as you described here [1] glibc version 2.19.
[1] https://blog.flameeyes.eu/2011/06/gold-readiness-obstacle-1-berkeley-db
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug dynamic-link/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
` (6 preceding siblings ...)
2014-06-23 19:29 ` david.heidelberger at ixit dot cz
@ 2014-06-27 12:57 ` fweimer at redhat dot com
2014-06-28 5:56 ` naesten at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 12:57 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=12977
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug dynamic-link/12977] glibc dynamic linker behaves unpredictable when using base version
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
` (7 preceding siblings ...)
2014-06-27 12:57 ` fweimer at redhat dot com
@ 2014-06-28 5:56 ` naesten at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: naesten at gmail dot com @ 2014-06-28 5:56 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=12977
Samuel Bronson <naesten at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |glibc_2.13, glibc_2.19
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-06-28 5:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-09 5:33 [Bug libc/12977] New: glibc dynamic linker behaves unpredictable when using base version ian at airs dot com
2012-01-09 9:00 ` [Bug libc/12977] " jrnieder at gmail dot com
2012-02-21 2:17 ` [Bug ld.so|libdl/12977] " jsm28 at gcc dot gnu.org
2012-03-25 5:30 ` [Bug dynamic-link/12977] " devurandom at gmx dot net
2012-03-26 10:19 ` ppluzhnikov at google dot com
2012-03-30 7:28 ` naesten at gmail dot com
2012-05-13 23:58 ` jrnieder at gmail dot com
2014-06-23 19:29 ` david.heidelberger at ixit dot cz
2014-06-27 12:57 ` fweimer at redhat dot com
2014-06-28 5:56 ` naesten at gmail 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).