This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: continuing egcs-1.1 problems
- To: Elgin Lee <ehl at funghi dot com>
- Subject: Re: continuing egcs-1.1 problems
- From: Gary Thomas <gdt at linuxppc dot org>
- Date: Thu, 12 Nov 1998 07:21:08 -0000 (GMT)
- Cc: dje at watson dot ibm dot com, phadke at kewalo dot eng dot hawaii dot edu, Franz dot Sirl-kernel at lauterbach dot com, law at cygnus dot com, bacon at mediaone dot net, egcs at cygnus dot com, bacon at aerodyne dot com
On 12-Nov-98 Elgin Lee wrote:
>>>>>> In <XFMail.981112042619.gdt@linuxppc.org>
>>>>>> Gary Thomas <gdt@linuxppc.org> wrote:
>
>> However, all of that said, it will be difficult to use EGCS without the
>> 48 byte trampoline patch in the immediate future. This is because virtually
>> every program already built has the [buggy] previously patched 'libgcc'
>> linked into it. Changing the compiler now will cause newly compiled
>> programs to fail with existing shared libraries and changing the libraries
>> will cause existing programs to fail.
> <snip>
>
> Gary,
>
> Is it really true that changing the shared libraries will cause
> existing programs to fail? The old libgcc.a uses
>
> li r8,__trampoline_size /* verify that the trampoline is big enough */
> cmpw cr1,r4,r8
> srwi r4,r4,2 /* # words to move */
> addi r9,r3,-4 /* adjust pointer for lwzu */
> mtctr r4
> blt cr1,.Labort
>
> where __trampoline_size is 40. If the glibc library is rebuilt with
> an unpatched egcs 1.1.1, then won't it pass 40 in register r4? In
> that case, r4 is *not* less than r8 so the abort branch would not be
> taken.
>
> Actually, only way that the abort branch would be taken is if the
> caller requests a trampoline with size less than 40--which I don't
> think ever occurs.
>
This is the behaviour that I observed when experimenting with it
yesterday. When I rebuilt GLIBC, old programs (like 'ls') fail
when the new library calls "__trampoline_setup" (which is linked
into the main program) because the compare instruction was wrong.
If I rebuilt such a program, it fails with the old library for
the same reason. However, new program+new library works fine.
------------------------------------------------------------------------
Gary Thomas |
email: gdt@linuxppc.org | "Fine wine is a necessity of
... opinions expressed here are mine | life for me"
and no one else would claim them! |
| Thomas Jefferson
------------------------------------------------------------------------