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]
Other format: [Raw text]

Fix for mips PT_DYNAMIC code


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++)
 	    {


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