Fit 64-bit nits.
authorAlan Modra <amodra@gmail.com>
Tue, 11 Apr 2000 13:07:56 +0000 (13:07 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 11 Apr 2000 13:07:56 +0000 (13:07 +0000)
bfd/ChangeLog
bfd/coff-mips.c
bfd/elf32-hppa.c
bfd/elf32-mips.c

index 823446b..3321d25 100644 (file)
@@ -1,3 +1,12 @@
+2000-04-11  Alan Modra  <alan@linuxcare.com.au>
+
+       * 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  <twall@cygnus.com>
 
        * coff-tic54x.c: Now builds with all targets.
@@ -6105,7 +6114,7 @@ Mon Feb 23 19:31:19 1998  Ian Lance Taylor  <ian@cygnus.com>
 1998-02-23 15:53  Richard Henderson  <rth@cygnus.com>
 
        * 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  <ian@cygnus.com>
index bb4b15e..7b1512f 100644 (file)
@@ -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;
index 683a308..dfabbad 100644 (file)
@@ -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)
index d91bab9..d8471bf 100644 (file)
@@ -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;