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]

correct reloc.c address test


Committed.

	* reloc.c (bfd_install_relocation): Correct reloc address test.
	(bfd_perform_relocation): Formatting fix.
	* bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.

Index: bfd/reloc.c
===================================================================
RCS file: /cvs/src/src/bfd/reloc.c,v
retrieving revision 1.49
diff -u -p -r1.49 reloc.c
--- reloc.c	2001/12/02 13:14:48	1.49
+++ reloc.c	2001/12/03 23:06:55
@@ -627,8 +627,8 @@ bfd_perform_relocation (abfd, reloc_entr
     }
 
   /* Is the address of the relocation really within the section?  */
-  if (reloc_entry->address > input_section->_cooked_size /
-      bfd_octets_per_byte (abfd))
+  if (reloc_entry->address > (input_section->_cooked_size
+			      / bfd_octets_per_byte (abfd)))
     return bfd_reloc_outofrange;
 
   /* Work out which section the relocation is targetted at and the
@@ -1023,7 +1023,8 @@ bfd_install_relocation (abfd, reloc_entr
     }
 
   /* Is the address of the relocation really within the section?  */
-  if (reloc_entry->address > input_section->_cooked_size)
+  if (reloc_entry->address > (input_section->_cooked_size
+			      / bfd_octets_per_byte (abfd)))
     return bfd_reloc_outofrange;
 
   /* Work out which section the relocation is targetted at and the


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