This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Why does mips define elf_backend_sign_extend_vma to true?


> http://sources.redhat.com/ml/binutils/1999-11/msg00067.html
> 
> which said
> 
> GDB encounters situtations (c.f. assorted mips targets) where the object
> file contains 32 bit addresses but the target has a 64 bit address
> space.  The 32 address values being implicitly zero or sign extended to
> 64 bits.  GDB needs to know what the object file format assumed (or
> didn't in some case) is doing so that it can correctly do things like
> compares.
> 
> The key here is "the target has a 64 bit address space." It is not the same
> as the gdb/nm/objdump configured with the 64bit BFD. The approach is wrong.
> 
> It seems that I am the only one who thinks it is incorrect. I will find a
> simple way to get around it in my binutils/gdb.
> 
> If people agreee it is wrong, I am willing to spend time finding a soluton
> acceptable for everyone.


There is an old saying K.I.S.S.

GDB was, not so recently changed to apply the rule that the MIPS target, 
always, no matter what, sign extens 32 bit addresses.

It had the pleasant side effect of fixing numerous bugs and flushing out 
too much bogus code.  What your proposing is a step back into the dark 
ages of MIPS programming.

	Andrew




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]