Small gas patch

Ian Lance Taylor ian@zembu.com
Sat Nov 20 11:48:00 GMT 1999


   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


More information about the Binutils mailing list