This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: 0xffffffff when BFD64
- To: ian at zembu dot com
- Subject: Re: 0xffffffff when BFD64
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sat, 8 Apr 2000 22:32:03 +1000 (EST)
- cc: binutils at sourceware dot cygnus dot com
Alright, I've abandoned my push to fix the problems caused by klunky old
compilers. Here is what remains, a few 64 bit int problems I happened to
notice by the way.
OK to install?
--
Linuxcare. Support for the Revolution.
bfd/ChangeLog
* 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.
Index: bfd/coff-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-mips.c,v
retrieving revision 1.5
diff -u -p -r1.5 coff-mips.c
--- coff-mips.c 2000/03/01 19:40:53 1.5
+++ coff-mips.c 2000/04/08 09:05:41
@@ -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: bfd/elf32-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mips.c,v
retrieving revision 1.60
diff -u -p -r1.60 elf32-mips.c
--- elf32-mips.c 2000/03/11 02:23:10 1.60
+++ elf32-mips.c 2000/04/08 09:07:25
@@ -1520,7 +1520,7 @@ gprel16_with_gp (abfd, symbol, reloc_ent
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: bfd/elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.10
diff -u -p -r1.10 elf32-hppa.c
--- elf32-hppa.c 2000/03/01 19:40:53 1.10
+++ elf32-hppa.c 2000/04/08 09:06:39
@@ -665,7 +665,7 @@ elf32_hppa_bfd_final_link_relocate (howt
/* 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, desti
{
/* 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)