public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Small gas patch
@ 1999-11-20 11:17 Geoff Berry
  1999-11-20 11:48 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Geoff Berry @ 1999-11-20 11:17 UTC (permalink / raw)
  To: Binutils-ML

1999-11-19  Geoff Berry  <gcb@gnu.org>

	* listing.c (buffer_line): Open source file in binary mode to fix
	listing file generation under Cygwin.
	
	* symbols.c (symbol_find_base): Copy string before converting to
	upper case if symbols aren't case sensitive.


--- binutils-2.9.1/gas/listing.c~	Tue Apr 07 15:47:32 1998
+++ binutils-2.9.1/gas/listing.c	Fri Nov 19 12:58:42 1999
@@ -448,7 +448,7 @@
 	}
 
       last_open_file_info = file;
-      last_open_file = fopen (file->filename, "r");
+      last_open_file = fopen (file->filename, "rb");
       if (last_open_file == NULL)
 	{
 	  file->at_end = 1;
--- binutils-2.9.1/gas/symbols.c~	Tue Apr 07 15:47:33 1998
+++ binutils-2.9.1/gas/symbols.c	Fri Nov 19 12:57:29 1999
@@ -466,6 +466,7 @@
       unsigned char *copy;
 
       copy = (unsigned char *) alloca (strlen (name) + 1);
+      strcpy (copy, name);
       name = (const char *) copy;
       for (; *copy != '\0'; copy++)
 	if (islower (*copy))

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Small gas patch
  1999-11-20 11:17 Small gas patch Geoff Berry
@ 1999-11-20 11:48 ` Ian Lance Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 1999-11-20 11:48 UTC (permalink / raw)
  To: gcb; +Cc: binutils

   From: Geoff Berry <gcb@cs.duke.edu>
   Date: 19 Nov 1999 12:54:20 -0500

Thanks for sending the patches.

   1999-11-19  Geoff Berry  <gcb@gnu.org>

	   * listing.c (buffer_line): Open source file in binary mode to fix
	   listing file generation under Cygwin.

   --- binutils-2.9.1/gas/listing.c~	Tue Apr 07 15:47:32 1998
   +++ binutils-2.9.1/gas/listing.c	Fri Nov 19 12:58:42 1999
   @@ -448,7 +448,7 @@
	   }

	  last_open_file_info = file;
   -      last_open_file = fopen (file->filename, "r");
   +      last_open_file = fopen (file->filename, "rb");
	  if (last_open_file == NULL)
	   {
	     file->at_end = 1;

I don't understand why this is correct.  The file in question is an
assembler source file, which should be a text file.  Why is it correct
to open it in binary mode?

fseek and ftell are supposed to work correctly for text files,
provided you don't try to manipulate the file position, which gas
doesn't.  If that doesn't work for cygwin, then it seems to me that
something else is wrong.

	   * symbols.c (symbol_find_base): Copy string before converting to
	   upper case if symbols aren't case sensitive.

This code has changed in the development sources.  The current code
looks correct to me.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: small gas patch
  2001-09-14 13:17 small " Eric Christopher
@ 2001-09-14 21:48 ` Thiemo Seufer
  0 siblings, 0 replies; 4+ messages in thread
From: Thiemo Seufer @ 2001-09-14 21:48 UTC (permalink / raw)
  To: binutils

Eric Christopher wrote:
> gp32 and gp64 should not set the output arch. :)
> 
> 2001-09-14  Eric Christopher  <echristo@redhat.com>
> 
> 	* config/tc-mips.c (md_parse_option): Remove setting mips_64 via
> 	-mgp32/mgp64.

It's partially the right behaviour for -mgp32, since mips_64
means ABI 64 conformance which can't be fulfilled then.

I've already posted a patch under the subject "[PATCH] MIPS gas ABI options"
which contains a bit more elaborated solution for this.


Thiemo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* small gas patch
@ 2001-09-14 13:17 Eric Christopher
  2001-09-14 21:48 ` Thiemo Seufer
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Christopher @ 2001-09-14 13:17 UTC (permalink / raw)
  To: binutils

gp32 and gp64 should not set the output arch. :)

2001-09-14  Eric Christopher  <echristo@redhat.com>

	* config/tc-mips.c (md_parse_option): Remove setting mips_64 via
	-mgp32/mgp64.

-- 
Look out behind you!

Index: config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.75
diff -u -p -w -r1.75 tc-mips.c
--- tc-mips.c	2001/09/12 21:19:37	1.75
+++ tc-mips.c	2001/09/14 20:16:41
@@ -9251,7 +9251,6 @@ md_parse_option (c, arg)
 
     case OPTION_GP32:
       mips_gp32 = 1;
-      mips_64 = 0;
 
       /* We deliberately don't allow "-gp32" to set the MIPS_32BITMODE
 	 flag in object files because to do so would make it
@@ -9269,7 +9268,6 @@ md_parse_option (c, arg)
 
     case OPTION_GP64:
       mips_gp32 = 0;
-      mips_64 = 1;
 #if 0
       mips_32bitmode = 0;
 #endif

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-14 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-20 11:17 Small gas patch Geoff Berry
1999-11-20 11:48 ` Ian Lance Taylor
2001-09-14 13:17 small " Eric Christopher
2001-09-14 21:48 ` Thiemo Seufer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).