Subject: Announce: binutils rpm package

From: [email-masked]
Date: Mon, 24 Nov 1997 05:45:18 +0100

-----BEGIN PGP SIGNED MESSAGE-----

Hi all,

I've uploaded little endian native binaries and a source rpm package
of binutils-2.8.1-1 to ftp.linux.sgi.com.

  Ralf

f234b72cc2982ec4e2d88db6d700b3b5  binutils-2.8.1-1.mips.rpm
d71aeb4d0f36d4a40bb44714099520e3  binutils-2.8.1-1.src.rpm

---

From: [email-masked] (Alan Cox)
Date: Mon, 24 Nov 1997 12:04:00 +0000 (GMT)

> d71aeb4d0f36d4a40bb44714099520e3  binutils-2.8.1-1.src.rpm

The SRPM appears corrupt - its about 1Meg short

---

From: [email-masked]
Date: Mon, 24 Nov 1997 14:29:28 +0100

> The SRPM appears corrupt - its about 1Meg short

Thanks, I'll try to upload it as a single part later the day when
phone fees are reasonable insane[*].  So long if you want to rebuild
the package for the Indy, you can use the attached spec file and
patch (identical to the one on Linus) plus the binutils-2.8.1.tar.gz
file from Redhat's binutils-2.8.1-1 package.  (binutils-2.8.1.tar.gz
should be the FSF version.)

  Ralf

*: Sorry, Ron ...
diff -urN binutils-2.8.1.orig/gas/ChangeLog binutils-2.8.1/gas/ChangeLog
--- binutils-2.8.1.orig/gas/ChangeLog	Mon May 26 10:32:45 1997
+++ binutils-2.8.1/gas/ChangeLog	Tue Oct 21 03:32:24 1997
@@ -1,3 +1,10 @@
+Tue Oct 21 03:23:59 1997  Ralf Baechle  <[email-masked]>
+
+	* config/tc-mips.c (macro): Only emit a BFD_RELOC_MIPS_LITERAL
+	when the symbol is in the .lit section.  Required for a.out
+	support.
+	(mips_ip): Fix %HI, %hi and %lo operators.
+
 Mon May 26 13:24:25 1997  Ian Lance Taylor  <[email-masked]>
 
 	* doc/as.texinfo: Don't use @value in section names or index
diff -urN binutils-2.8.1.orig/gas/config/tc-mips.c binutils-2.8.1/gas/config/tc-mips.c
--- binutils-2.8.1.orig/gas/config/tc-mips.c	Mon May 26 10:32:40 1997
+++ binutils-2.8.1/gas/config/tc-mips.c	Tue Oct 21 03:22:48 1997
@@ -4863,13 +4863,22 @@
       else
 	{
 	  assert (offset_expr.X_op == O_symbol
-		  && strcmp (segment_name (S_GET_SEGMENT
-					   (offset_expr.X_add_symbol)),
-			     ".lit4") == 0
 		  && offset_expr.X_add_number == 0);
-	  macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
-		       treg, (int) BFD_RELOC_MIPS_LITERAL, GP);
-	  return;
+	  s = segment_name (S_GET_SEGMENT (offset_expr.X_add_symbol));
+	  if (strcmp (s, ".lit4") == 0)
+	    {
+	      macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
+			   treg, (int) BFD_RELOC_MIPS_LITERAL, GP);
+	      return;
+	    }
+	  else
+	    {
+	      /* FIXME: This won't work for a 64 bit address.  */
+	      macro_build_lui ((char *) NULL, &icnt, &offset_expr, AT);
+	      macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
+			   treg, (int) BFD_RELOC_LO16, AT);
+	      return;
+	    }
 	}
 
     case M_LI_D:
@@ -6965,11 +6974,23 @@
 	      c = my_getSmallExpression (&imm_expr, s);
 	      if (c != '\0')
 		{
-		  if (c != 'l')
+		  if (c == 'l')
+		    {
+		      if (imm_expr.X_op == O_constant)
+			{
+			  imm_expr.X_add_number &= 0xffff;
+			  imm_reloc = BFD_RELOC_LO16;
+			}
+		    }
+		  else
 		    {
 		      if (imm_expr.X_op == O_constant)
-			imm_expr.X_add_number =
-			  (imm_expr.X_add_number >> 16) & 0xffff;
+			{
+			  if (c == 'h' && (imm_expr.X_add_number & 0x8000))
+			    imm_expr.X_add_number += 0x1000;
+			  imm_expr.X_add_number =
+			    (imm_expr.X_add_number >> 16) & 0xffff;
+			}
 		      else if (c == 'h')
 			{
 			  imm_reloc = BFD_RELOC_HI16_S;
@@ -7064,11 +7085,22 @@
 		break;
 
 	      offset_reloc = BFD_RELOC_LO16;
-	      if (c == 'h' || c == 'H')
+	      if (c)
 		{
-		  assert (offset_expr.X_op == O_constant);
-		  offset_expr.X_add_number =
-		    (offset_expr.X_add_number >> 16) & 0xffff;
+		  if (c != 'l')
+		    {
+		      if (offset_expr.X_op == O_constant)
+			{
+			  if (c == 'h' && (offset_expr.X_add_number & 0x8000))
+			    offset_expr.X_add_number += 0x1000;
+			  offset_expr.X_add_number =
+			    (offset_expr.X_add_number >> 16) & 0xffff;
+			}
+		      else if (c == 'h')
+			offset_reloc = BFD_RELOC_HI16_S;
+		      else
+			offset_reloc = BFD_RELOC_HI16;
+		    }
 		}
 	      s = expr_end;
 	      continue;
@@ -7081,10 +7113,13 @@
 
 	    case 'u':		/* upper 16 bits */
 	      c = my_getSmallExpression (&imm_expr, s);
-	      if (imm_expr.X_op == O_constant
-		  && (imm_expr.X_add_number < 0
-		      || imm_expr.X_add_number >= 0x10000))
-		as_bad ("lui expression not in range 0..65535");
+	      if (!c)
+		{
+		  if (imm_expr.X_op == O_constant
+		      && (imm_expr.X_add_number < 0
+			  || imm_expr.X_add_number >= 0x10000))
+		    as_bad ("lui expression not in range 0..65535");
+		}
 	      imm_reloc = BFD_RELOC_LO16;
 	      if (c)
 		{