From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: "H . J . Lu" Cc: "Maciej W. Rozycki" , Richard Henderson , David B Anderson , gdb@sourceware.cygnus.com, binutils@sourceware.cygnus.com Subject: Re: Why does mips define elf_backend_sign_extend_vma to true? Date: Wed, 08 Aug 2001 08:18:00 -0000 Message-id: <3B71582D.4050003@cygnus.com> References: <20010807232102.A19636@lucon.org> <20010808072922.C26704@lucon.org> <3B7151C1.4030203@cygnus.com> <20010808080306.C26983@lucon.org> X-SW-Source: 2001-08/msg00069.html > > > 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