This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: [c/c++] i686 codegen bugs in tinfo2.cc


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~

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