This is the mail archive of the libc-alpha@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]

Re: _IO_stdin_used stripped by version scripts


* Aurelien Jarno:

> On some architectures the _IO_stdin_used symbol is used to determine if
> the executable has been linked against the older version of libio or the
> newer. More and more executables start to be linked with a version 
> script in order to control the symbols they export to their plugins.
> Examples of such software are firefox, network-manager or mplayer. When
> using a version-script without explicitly adding an entry for the
> _IO_stdin_used symbol, it appears as a local symbol in the resulting
> libraries. This causes random crashes or strange behaviours. We have
> observed that in Debian at least on alpha, mips* and powerpc.

The first part would be to figure out what _IO_stdin_used is actually
about.  I think it's there to preserve the libio ABI (as far as
vtables are concerned) despite the fact that the struct layout was
changed (possibly to reflect a C++ ABI change).

One fairly conservative change would version the symbols which
activate vtable compatibility, and have the new versions override the
_IO_stdin_used mechanism.  There should be room for such a flag in the
_flags2 member of struct _IO_file.

> People claim that adding _IO_stdin_used to the version scripts is at
> best a workaround and this should be fixed in the toolchain instead.

Is everyone (developers and users) willing to upgrade the toolchain?
I don't think so.  Fixings in glibc tend to need that before they
become effective.

> What are the opinion of GNU libc people? How is that solved in other
> distributions?

We haven't seen those crashes in Fedora, although the symbol is
sometimes missing there, too, and at least i386 is old enough to need
this mechanism.  We don't have any libio/stdio patches in the Fedora
glibc.


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