Fix .space with big count

Andreas Schwab schwab@suse.de
Fri Jan 11 22:11:00 GMT 2008


gas/read.c:s_space is using long to represent the repeat count.  This
silently truncates counts > 4Gb on a 32-bit host for a 64-bit target.
Checked in as obvious.

Andreas.

2008-01-11  Andreas Schwab  <schwab@suse.de>

	* read.c (s_space): Declare `repeat' as offsetT.

--- gas/read.c.~1.135.~	2008-01-10 10:28:53.000000000 +0100
+++ gas/read.c	2008-01-11 16:38:42.000000000 +0100
@@ -3168,7 +3168,7 @@ s_space (int mult)
 
       if (exp.X_op == O_constant)
 	{
-	  long repeat;
+	  offsetT repeat;
 
 	  repeat = exp.X_add_number;
 	  if (mult)

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Binutils mailing list