[rfc] For mips, sign-extended ecoff offsets
Mon Jun 19 18:50:00 GMT 2000
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.
More information about the Binutils