Linux MIPS Architecture development
 help / color / mirror / Atom feed
* mips gas is horribly broken
@ 2001-06-06 16:18 H . J . Lu
  2001-06-06 19:32 ` Geoff Keating
  0 siblings, 1 reply; 7+ messages in thread
From: H . J . Lu @ 2001-06-06 16:18 UTC (permalink / raw)
  To: binutils; +Cc: linux-mips

Around line 9544 in gas/config/tc-mips.c, there are

        if (value != 0 && ! fixP->fx_pcrel)
          {
            /* In this case, the bfd_install_relocation routine will
               incorrectly add the symbol value back in.  We just want
               the addend to appear in the object file.
               FIXME: If this makes VALUE zero, we're toast.  */
            value -= S_GET_VALUE (fixP->fx_addsy);
          }

I spent several days trying to figure out why libstdc++ was miscompiled
on Linux/mipsel. That was because value was zero. That is totally
unacceptable for gas to knowingly generate incorrect binaries. At
least, we should do

            value -= S_GET_VALUE (fixP->fx_addsy);
	    assert (value != 0);

But I'd like to fix it once for all. Does anyone have any suggestions?

Thanks.


H.J.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-06-07  4:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-06 16:18 mips gas is horribly broken H . J . Lu
2001-06-06 19:32 ` Geoff Keating
2001-06-06 20:15   ` H . J . Lu
2001-06-06 21:59     ` Geoff Keating
2001-06-07  0:02       ` H . J . Lu
2001-06-07  0:12         ` Ian Lance Taylor
2001-06-07  4:48         ` Geoff Keating

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox