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?


> 
> 
> Please try
> 
> 1. Find a decent compiler for Linux/mips.
> 2. Check out the Linux mips kernel from oss.sgi.com.
> 3. Compile the kernel with -g.
> 4. Compile Linux/mips gdb with 64bit BFD.
> 5. Do


You might need to find a simpler test!


> The problem is the 64bit BFD does the sign extension to the section
> addresses which have the bit 31 set. Gdb cannot find 0x8011c530 in
> those ranges. You may say oh, let's fix gdb to do
> 
> (gdb) p printk
> $1 = {int (char *)} 0xffffffff8011c530
> 
> I don't think it will be useful to me. I don't think I can set a break
> pount at 0xffffffff8011c530. The sign extension here is only the
> artifact of the 64bit BFD. My mips target is 32bit.


There is a bug but the underlying problem is the oposite of what you 
claim.  Something is breaking that simple always sign-extend rule 
(forgetting to sign extend something) and, as a consequence, the symbol 
lookup is failing.

Remember people around here spent years fighting GDB and BFD MIPS 
braindamage until someone realised it was all backwards.

	Andrew


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