public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@redhat.com>
To: binutils@sources.redhat.com
Subject: Fix for mips PT_DYNAMIC code
Date: Thu, 14 Aug 2003 09:37:00 -0000	[thread overview]
Message-ID: <wvnbruslh2v.fsf@talisman.cambridge.redhat.com> (raw)

If the address of .dynamic was > 0xffffffff, we'd set PT_DYNAMIC to the
address of the lowest loadable section.  This triggers every time for me
on mips64-linux-gnu (elf64btsmip now has a TEXT_START_ADDR of 0x120000000).

Tested with gcc bootstrap & C regression test on mips64-linux-gnu,
all three multilibs.  Installed as obvious.

Richard


	* elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
	code to work with 64-bit bfds.

Index: elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.72
diff -u -p -d -r1.72 elfxx-mips.c
--- elfxx-mips.c	7 Aug 2003 08:38:10 -0000	1.72
+++ elfxx-mips.c	13 Aug 2003 06:37:01 -0000
@@ -7474,7 +7474,7 @@ _bfd_mips_elf_modify_segment_map (abfd)
 	  unsigned int i, c;
 	  struct elf_segment_map *n;
 
-	  low = 0xffffffff;
+	  low = ~(bfd_vma) 0;
 	  high = 0;
 	  for (i = 0; i < sizeof sec_names / sizeof sec_names[0]; i++)
 	    {

                 reply	other threads:[~2003-08-14  9:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=wvnbruslh2v.fsf@talisman.cambridge.redhat.com \
    --to=rsandifo@redhat.com \
    --cc=binutils@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).