This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [c/c++] i686 codegen bugs in tinfo2.cc
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Subject: Re: [c/c++] i686 codegen bugs in tinfo2.cc
- From: Richard Henderson <rth at redhat dot com>
- Date: Sun, 14 Jan 2001 15:49:28 -0800
- Cc: gcc-bugs at gcc dot gnu dot org, rth at cygnus dot com, scox at redhat dot com
- References: <200101110257.f0B2vu525628@fillmore.constant.com>
On Wed, Jan 10, 2001 at 06:57:56PM -0800, Benjamin Kosnik wrote:
> The following c++ testfailures only occur with i686, and not on
> i586. I'm hoping that the x86 port maintainers can help me out....
I've got it. Stepping through operators.sh-exe I see that
_ZNKSs7compareEPKc is either mis-assembled or mis-linked.
For i586 the pic register is set up by
call .Lnext
.Lnext: pop %ebx
addl $GOTPC, %ebx
For i686 the pic register is set up by
.Lsomewhere:
movl 0(%esp), %ebx
ret
call .Lsomewhere
addl $GOTPC, %ebx
In this case, because of linkonce, .Lsomewhere is in a different section
from _ZNKSs7compareEPKc and we end up jumping to the wrong place, and it
is all downhill from there. That is also why the traceback is more or
less useless.
There are two things that should happen.
(1) Find the binutils bug.
(2) Emit one pic register thunk per section so that gc-sections
needn't pull in _ZNSs9_M_mutateEjjj to satisfy _ZNKSs7compareEPKc.
r~