From 43cbcf28590f2883478602d7cd7be26341ead69f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 11 Apr 2000 13:07:56 +0000 Subject: [PATCH] Fit 64-bit nits. --- bfd/ChangeLog | 11 ++++++++++- bfd/coff-mips.c | 4 ++-- bfd/elf32-hppa.c | 6 +++--- bfd/elf32-mips.c | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 823446b522..3321d25d57 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2000-04-11 Alan Modra + + * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using + signed quantites. + * elf32-mips.c (gprel16_with_gp): Likewise. + * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range + here using -0x40000, not (int)0xfffc0000. + (elf32_hppa_size_of_stub): Likewise. + 2000-04-11 Timothy Wall * coff-tic54x.c: Now builds with all targets. @@ -6105,7 +6114,7 @@ Mon Feb 23 19:31:19 1998 Ian Lance Taylor 1998-02-23 15:53 Richard Henderson * elf32-i386.c (elf_i386_relocate_section): A pc-relative - relocation against a now-local symbol should not have a dynamic + relocation against a non-local symbol should not have a dynamic relocation. Mon Feb 23 16:17:08 1998 Ian Lance Taylor diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c index bb4b15e96c..7b1512f349 100644 --- a/bfd/coff-mips.c +++ b/bfd/coff-mips.c @@ -1,5 +1,5 @@ /* BFD back-end for MIPS Extended-Coff files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -910,7 +910,7 @@ mips_gprel_reloc (abfd, reloc_entry->address += input_section->output_offset; /* Make sure it fit in 16 bits. */ - if (val >= 0x8000 && val < 0xffff8000) + if ((long) val >= 0x8000 || (long) val < -0x8000) return bfd_reloc_overflow; return bfd_reloc_ok; diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 683a308515..dfabbad008 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1,5 +1,5 @@ /* BFD back-end for HP PA-RISC ELF files. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by @@ -665,7 +665,7 @@ elf32_hppa_bfd_final_link_relocate (howto, input_bfd, output_bfd, /* Any kind of linker stub needed? */ if (((int)(value - location) > 0x3ffff) - || ((int)(value - location) < (int)0xfffc0000)) + || ((int)(value - location) < -0x40000)) { struct elf32_hppa_stub_hash_table *stub_hash_table; struct elf32_hppa_stub_hash_entry *stub_hash; @@ -831,7 +831,7 @@ elf32_hppa_size_of_stub (location, destination, sym_name) { /* Determine if a long branch stub is needed. */ if (!(((int)(location - destination) > 0x3ffff) - || ((int)(location - destination) < (int)0xfffc0000))) + || ((int)(location - destination) < -0x40000))) return 0; if (!strncmp ("$$", sym_name, 2) diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index d91bab9726..d8471bf193 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -1520,7 +1520,7 @@ gprel16_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data, reloc_entry->address += input_section->output_offset; /* Make sure it fit in 16 bits. */ - if (val >= 0x8000 && val < 0xffff8000) + if ((long) val >= 0x8000 || (long) val < -0x8000) return bfd_reloc_overflow; return bfd_reloc_ok; -- 2.34.1