From 937149dd3c9c927b00431319349e6ef8a3fd3d34 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 6 Mar 2002 04:59:36 +0000 Subject: * config/tc-i386.c (tc_gen_reloc): Don't attempt to handle 8 byte relocs except when BFD64. * write.c (number_to_chars_bigendian): Don't abort when N is larger than sizeof (VAL). (number_to_chars_littleendian): Likewise. --- gas/ChangeLog | 9 +++++++++ gas/config/tc-i386.c | 2 ++ gas/write.c | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index fd09e98..27dc05a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2002-03-06 Alan Modra + + * config/tc-i386.c (tc_gen_reloc): Don't attempt to handle 8 byte + relocs except when BFD64. + + * write.c (number_to_chars_bigendian): Don't abort when N is + larger than sizeof (VAL). + (number_to_chars_littleendian): Likewise. + 2002-03-05 John David Anglin * config/tc-hppa.c (md_apply_fix3): Add cast. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 2b82037..0263bbc 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4882,7 +4882,9 @@ tc_gen_reloc (section, fixp) case 1: code = BFD_RELOC_8; break; case 2: code = BFD_RELOC_16; break; case 4: code = BFD_RELOC_32; break; +#ifdef BFD64 case 8: code = BFD_RELOC_64; break; +#endif } } break; diff --git a/gas/write.c b/gas/write.c index 9b20f90..f4dc2ae 100644 --- a/gas/write.c +++ b/gas/write.c @@ -2923,7 +2923,7 @@ number_to_chars_bigendian (buf, val, n) valueT val; int n; { - if ((size_t) n > sizeof (val) || n <= 0) + if (n <= 0) abort (); while (n--) { @@ -2938,7 +2938,7 @@ number_to_chars_littleendian (buf, val, n) valueT val; int n; { - if ((size_t) n > sizeof (val) || n <= 0) + if (n <= 0) abort (); while (n--) { -- cgit v1.1