Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [patch] bfd/: bfd_elf_bfd_from_remote_memory 32bit &= 0xffffffff
Date: Thu, 11 Feb 2010 12:13:00 -0000	[thread overview]
Message-ID: <m3tytoynpk.fsf@hase.home> (raw)
In-Reply-To: <20100211115730.GA7358@host0.dyn.jankratochvil.net> (Jan 	Kratochvil's message of "Thu, 11 Feb 2010 12:57:30 +0100")

Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> --- a/bfd/elfcode.h
> +++ b/bfd/elfcode.h
> @@ -1745,6 +1745,8 @@ NAME(_bfd_elf,bfd_from_remote_memory)
>  	  if (!loadbase_set && (i_phdrs[i].p_offset & -i_phdrs[i].p_align) == 0)
>  	    {
>  	      loadbase = ehdr_vma - (i_phdrs[i].p_vaddr & -i_phdrs[i].p_align);
> +	      if (ELFCLASS == ELFCLASS32)
> +		loadbase &= 0xffffffff;

Some targets use signed addresses.

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."


  reply	other threads:[~2010-02-11 12:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 11:57 Jan Kratochvil
2010-02-11 12:13 ` Andreas Schwab [this message]
2010-02-11 12:43   ` Jan Kratochvil
     [not found]   ` <20100211124302.GA8435__38068.0548646071$1265892205$gmane$org@host0.dyn.jankratochvil.net>
2010-02-16 23:24     ` Tom Tromey
2010-02-17 11:34       ` Jan Kratochvil
2010-02-17 18:50         ` Tom Tromey
2010-02-20  0:43           ` Jan Kratochvil
2010-02-11 12:51 ` Mark Kettenis
2010-02-11 13:30   ` [cancelled] " Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tytoynpk.fsf@hase.home \
    --to=schwab@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox