]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
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 823446b5228d525586fd8cb1702dc13e4d2eae96..3321d25d57b1a4cc6686d1ae8ce0f5912a1e34ec 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 bb4b15e96c244170ae0d05922d0ee7e37e3ffa9f..7b1512f349801db54edf999a7a507a340a759b5f 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 683a308515af25911bdf8920f8cedd0ef09b2dad..dfabbad00824b165569043b1dfd034598a58b86c 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 d91bab9726841e2e304b21e4d74a8381a2e40639..d8471bf1933be2548c1c5a6734f808b2824f855e 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;