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

Re: no release yet


> From: hjl@lucon.org (H.J. Lu)
> Date: Thu, 4 Feb 1999 06:15:54 -0800 (PST)
> Cc: libc-hacker@cygnus.com
> 
> > 
> > As you might have seen we have no release yet.  The problem is that
> 
> 
> What about the PPC ABI problem?
> 
> We have a PPC running RedHat 5.0 based on glibc 1.99. It uses libc.so.6,
> ld.so.1, ... as sonames. I am horrified to find out glibc 2.1 doesn't
> change soname on PPC, but it has a different ABI from glibc 1.99. As
> the result, I cannot install glibc 2.1 over a glibc 1.99 system on
> PPC. May I ask why we have done this?
> 
> On alpha, we have the same problem. We solve it by change sonames
> to 6.1 from 6 and etc. Can we do the same for PPC? I can provide
> a patch if necessary.
>  
> BTW, we need to patch both egcs and glibc 2.1. I was wondering how
> this could have happened.

There is a compatibility application that patches old binaries.  Old
binaries will not work with the new ld.so anyway because of old
binutils and egcs bugs, and the X11 API has changed.

This has been a known issue since _before_ the redhat 5.0-based
release you are using came out.  I have been repeatedly warning about
it for more than 18 months now.  Both libraries _are the same age_;
there is no 'backward' compatibility, only sideways compatibility.  I
cannot change sonames because it would break everyone's system who has
been using post-2.0 glibc snapshots, including the pre-R5 linuxppc
releases which are redhat 5.1 and/or redhat 5.2-based.

I would also rather have a sharp break with the past than having to
maintain multimegabytes of old, buggy libraries.

For those very few programs (well, netscape, to be precise) that are
not available in source form, there is a program:

[geoffk@geoffk geoffk]$ fix961212 --help
Usage: fix961212 [OPTION] FILE ...
Fix FILE to make it work with libc 2.1 on powerpc.

  -s, --quiet          don't print output indicating changes were made
  -v, --verbose        if a file was not changed, say why
  -p, --preserve       if the file was originally setuid, leave it that way
  -f, --force          ignore absence of read permission
      --help           display this help and exit
      --version        output version information and exit

The changes made are that:
1. A DT_RELENT program header entry is changed to the correct DT_RELAENT.
2. The startup procedure is modified to conform to the PPC version of the
   SVR4 ELF ABI.
3. Routines which use data structures that changed size between the 961212
   libc and the final libc 2.0, or which use constants that are different
   between the two versions, are redirected to call a stub library that
   emulates the old library behaviour.  The affected routines are:
       sigisemptyset, sigemptyset, sigfillset, sigprocmask, sigpending,
       sigaction, __sigsetjmp, __sigjmp_save, tcgetattr, tcsetattr,
       __fxstat, __xstat, __lxstat, readdir, readdir_r, scandir, alphasort,
       getdirentries, __res_init, __socket, __recv, _Xsetlocale.
4. R_PPC_GLOB_DAT relocations in shared objects that point to an absolute
   address are changed to be R_PPC_RELATIVE relocations.

If FILE is not a PowerPC ELF executable or shared object, or the changes
have already been made, or the changes don't need to be made, does nothing.


-- 
Geoffrey Keating <geoffk@ozemail.com.au>


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