From: Geoff Keating <geoffk@geoffk.org>
To: hjl@lucon.org
Cc: binutils@sourceware.cygnus.com, linux-mips@oss.sgi.com
Subject: Re: mips gas is horribly broken
Date: Wed, 6 Jun 2001 12:32:15 -0700 [thread overview]
Message-ID: <200106061932.MAA01399@geoffk.org> (raw)
In-Reply-To: <20010606091846.A21652@lucon.org> (hjl@lucon.org)
> Date: Wed, 6 Jun 2001 09:18:46 -0700
> From: "H . J . Lu" <hjl@lucon.org>
> Cc: linux-mips@oss.sgi.com
> Content-Disposition: inline
> User-Agent: Mutt/1.2.5i
>
> 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?
There is no easy fix. This has been a longstanding problem, but any
change to bfd_install_relocation would require modifying every port in
a corresponding way, see for instance the FIXME at line 4816 or so in
tc-ppc.c.
--
- Geoffrey Keating <geoffk@geoffk.org>
next prev parent reply other threads:[~2001-06-06 19:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-06 16:18 mips gas is horribly broken H . J . Lu
2001-06-06 19:32 ` Geoff Keating [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200106061932.MAA01399@geoffk.org \
--to=geoffk@geoffk.org \
--cc=binutils@sourceware.cygnus.com \
--cc=geoffk@redhat.com \
--cc=hjl@lucon.org \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.