This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Any idea what this is ?


On Wed, Mar 06, 2002 at 02:39:48AM +0100, Mikael Aronsson wrote:
> 
> The attached file causes the bug, it's just one line ".quad mylabel".
> 
> It is as 2.11.90 from MinGW32, running on Windows, generating coff output,
> no idea has it is configured though, if you are intesrested I guess I could
> dig it up.

Hmm, this seems to be a generic bug anyway.  I think the abort in
number_to_chars_* is a little heavy-handed, especially as it prevents
you seeing a more useful error message, eg.

$ x86/gas/as-new -o quadnum.o quadnum.s
quadnum.s: Assembler messages:
quadnum.s:1: Error: can not do 8 byte relocation
$ ../ppc/bin/gas/as-new -o quadnum.o quadnum.s
quadnum.s: Assembler messages:
quadnum.s:1: Error: reloc 1 not supported by object file format

gas/ChangeLog
	* 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.

Index: gas/write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.52
diff -u -p -r1.52 write.c
--- write.c	2002/01/05 13:13:16	1.52
+++ write.c	2002/03/06 04:29:08
@@ -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, 
      valueT val;
      int n;
 {
-  if ((size_t) n > sizeof (val) || n <= 0)
+  if (n <= 0)
     abort ();
   while (n--)
     {
Index: gas/config/tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.111
diff -u -p -r1.111 tc-i386.c
--- tc-i386.c	2002/02/13 11:19:07	1.111
+++ tc-i386.c	2002/03/06 04:29:13
@@ -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;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]