mips gas is horribly broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux