This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [rfc] For mips, sign-extended ecoff offsets
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfc] For mips, sign-extended ecoff offsets
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Tue, 20 Jun 2000 11:50:26 +1000 (EST)
- cc: BINUTILS Patches <binutils at sourceware dot cygnus dot com>, GDB Patches <gdb-patches at sourceware dot cygnus dot com>
On Tue, 20 Jun 2000, Andrew Cagney wrote:
> > I'm worried about what happens if things like PDR.adr get changed from
> > 0xa0000000 to 0xffffffffa0000000.
>
> Thats why I'm asking :-) Remember though, on the MIPS platform, if
> ``PDR.adr'' is an address then, the canonical form of the value
> ``0xa0000000'' obtained from an elf32 binary is 0xffffffffa00000000.
> GDB and BFD have, for too many years, been bribed and cajoled into
> perpetuated the lie that MIPS doesn't sign extend addresses. GDB's now
> decided to come clean on this matter (and purge an amazing amount of
> bogus code :-).
Well, it's the likelihood of other "bogus code" existing in binutils that
assumes addresses are _not_ sign extended that worries me. If you work to
the "You break it, you fix it" rule, then you may be taking on quite a bit
of work :-)
> Any way I've attached a revised patch. I wasn't ruthless enough the
> first time.... With this revision the linker appears to work :-)
> Testing is continuing.
There's an ECOF_ typo still in a comment.
> I guess the question for BFD people is, is this the correct approach to
> fixing this bug?
I'd like to hear Ian's comments on this before you check it in.
Regards, Alan Modra
--
Linuxcare. Support for the Revolution.