This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
correct reloc.c address test
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 4 Dec 2001 09:47:01 +1030
- Subject: 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