This is the mail archive of the libc-alpha@sources.redhat.com 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: Binary compatibility loss regarding errno


On Mon, Dec 23, 2002 at 01:38:30PM -0500, Daniel Jacobowitz wrote:
> On Mon, Dec 23, 2002 at 10:15:44AM -0800, Ulrich Drepper wrote:
> > Daniel Jacobowitz wrote:
> > 
> > > No, it IS silent.  Feel free to try it yourself,
> > 
> > I did:
> > 
> > 
> > $ ~/u
> > /home/drepper/u: relocation error: /home/drepper/u: symbol errno,
> > version GLIBC_2.0 not defined in file libc.so.6 with link time reference
> > 
> > 
> > I don't know what setup you are using but it works for me.
> 
> csu/Versions:
> 
>   GLIBC_2.0 {
> %if !(USE_TLS && HAVE___THREAD)
>     # global variables
>     _errno;
> 
>     # variables in normal name space
>     errno;
> %endif
>   }
> 
>   GLIBC_PRIVATE {
> %if USE_TLS && HAVE___THREAD
>     # This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
>     errno;
> %endif
> 
> So if you don't turn on TLS you get an errno that silently breaks.  If
> we don't have TLS why can't we maintain compatibility?

Well, it is supposed to work if --without-__thread or --without-tls.
Unfortunately it does not; it is unclear whether this is linker bug
(where if there is just errno@GLIBC_2.0 in the library, it makes the .got
entry for it R_386_RELATIVE and not R_386_32 errno@GLIBC_2.0) or whether
glibc is just asking too much.
Anyway, I still think glibc .so static link only wrappers and keeping
errno@@GLIBC_2.0 etc. would be best (and most tolerant to linkers).
E.g. on SPARC it was not possible to build current glibc (with the
patch I posted yesterday) with binutils 2.13.90.0.2, one has to use
2.13.90.0.16 or above. Otherwise ld completely messed up symbol versions
in libpthread.so, apparently because in libc.so there is
pthread_attr_init@GLIBC_2.0 and pthread_attr_init@GLIBC_2.1 while in
libpthread.so should be pthread_attr_init@GLIBC_2.0 and
pthread_attr_init@@GLIBC_2.1.

	Jakub


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