public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Sign extend VMAs on MIPS ELF64
@ 2007-08-22 22:29 Daniel Jacobowitz
  2007-08-23  1:40 ` Eric Christopher
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-08-22 22:29 UTC (permalink / raw)
  To: binutils

We're careful to mark o32 and n32 addresses as sign extendable for
MIPS, but not n64.  Normally this doesn't matter as N64 uses 64-bit
addresses anyway.  However gcc with -msym32 will use an address
size of 4 for the .debug_info section.  Without this patch GDB
does not sign extend addresses from a MIPS64 Linux kernel built with
-msym32, so e.g. a breakpoint will be set just above 2G instead of at
the very top of memory.

Is this OK?  No regressions on the GDB testsuite on various ABIs.

-- 
Daniel Jacobowitz
CodeSourcery

2007-08-22  Daniel Jacobowitz  <dan@codesourcery.com>

	* elf64-mips.c (elf_backend_sign_extend_vma): Define.

Index: elf64-mips.c
===================================================================
RCS file: /scratch/gcc/repos/src/src/bfd/elf64-mips.c,v
retrieving revision 1.83
diff -u -p -r1.83 elf64-mips.c
--- elf64-mips.c	10 Jul 2007 04:08:11 -0000	1.83
+++ elf64-mips.c	22 Aug 2007 16:47:28 -0000
@@ -3147,6 +3147,8 @@ const struct elf_size_info mips_elf64_si
 #define elf_backend_may_use_rela_p	1
 #define elf_backend_default_use_rela_p	1
 
+#define elf_backend_sign_extend_vma	TRUE
+
 #define elf_backend_write_section	_bfd_mips_elf_write_section
 
 /* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Sign extend VMAs on MIPS ELF64
  2007-08-22 22:29 Sign extend VMAs on MIPS ELF64 Daniel Jacobowitz
@ 2007-08-23  1:40 ` Eric Christopher
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Christopher @ 2007-08-23  1:40 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: binutils


On Aug 22, 2007, at 1:17 PM, Daniel Jacobowitz wrote:

> 2007-08-22  Daniel Jacobowitz  <dan@codesourcery.com>
>
> 	* elf64-mips.c (elf_backend_sign_extend_vma): Define.

OK.

-eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-22 20:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-22 22:29 Sign extend VMAs on MIPS ELF64 Daniel Jacobowitz
2007-08-23  1:40 ` Eric Christopher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).