diff options
author | Alan Modra <amodra@gmail.com> | 2001-12-03 23:16:20 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-12-03 23:16:20 +0000 |
commit | e207c4fac5440a4cff76850ea905586e727f2128 (patch) | |
tree | 408fafab749739f46e299857f8fb7493297d063d | |
parent | 742aeb63e9f0088cb5f2764d04304a7a04aa344d (diff) | |
download | gdb-e207c4fac5440a4cff76850ea905586e727f2128.zip gdb-e207c4fac5440a4cff76850ea905586e727f2128.tar.gz gdb-e207c4fac5440a4cff76850ea905586e727f2128.tar.bz2 |
* 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.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 4 | ||||
-rw-r--r-- | bfd/reloc.c | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 183fc0c..40fbaae 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2001-12-04 Alan Modra <amodra@bigpond.net.au> + + * 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. + 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com> * configure.in (LINGUAS): Add tr. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 5f61853..12fe5a9 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -2123,16 +2123,12 @@ to compensate for the borrow when the low bits are added. */ /* Like BFD_RELOC_LO16, but PC relative. */ BFD_RELOC_PCREL_LO16, -/* Relocation relative to the global pointer. */ -#define BFD_RELOC_MIPS_GPREL BFD_RELOC_GPREL16 - /* Relocation against a MIPS literal section. */ BFD_RELOC_MIPS_LITERAL, /* MIPS ELF relocations. */ BFD_RELOC_MIPS_GOT16, BFD_RELOC_MIPS_CALL16, -#define BFD_RELOC_MIPS_GPREL32 BFD_RELOC_GPREL32 BFD_RELOC_MIPS_GOT_HI16, BFD_RELOC_MIPS_GOT_LO16, BFD_RELOC_MIPS_CALL_HI16, diff --git a/bfd/reloc.c b/bfd/reloc.c index 78b039b..e0e7d16 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -627,8 +627,8 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd, } /* 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_entry, data_start, data_start_offset, } /* 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 |