Index: driver/as.cc
===================================================================
--- driver/as.cc	(revision cb94e41db9025ba582ed110d8213c1c52b493aec)
+++ driver/as.cc	(revision dd7c2ce08d7d32bb041bcbd7a87fba98d269fb37)
@@ -11,6 +11,6 @@
 // Created On       : Wed Aug  1 10:49:42 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Oct 23 16:10:26 2023
-// Update Count     : 137
+// Last Modified On : Tue Oct 24 16:53:18 2023
+// Update Count     : 155
 //
 
@@ -39,41 +39,50 @@
 	off_t size = mystat.st_size;
 
-	// if ( size ) {										// cannot map 0 sized file
-	// 	char * start = (char *)mmap( NULL, size + 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
-	// 	if ( start == (void *)-1 ) { perror( "mmap" ); exit( EXIT_FAILURE ); };
+	if ( size ) {										// cannot map 0 sized file
+		char * start = (char *)mmap( NULL, size + 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
+		if ( start == (void *)-1 ) { perror( "mmap" ); exit( EXIT_FAILURE ); };
 
-	// 	char * dcursor;
-	// 	if ( (dcursor = strstr( start, ".Ldebug_info0:" ) ) ) { // debug information ?
+		char * dcursor;
+		if ( (dcursor = strstr( start, ".Ldebug_info0:" ) ) ) { // debug information ?
+//			fprintf( stderr, "found .Ldebug_info0:\n" );
+#if defined( __x86_64__ )
+			if ( char * cursor = strstr( dcursor, ".long\t.LASF" ) ) { // language code ?
+//				fprintf( stderr, ".long\t.LASF\n" );
+#elif defined( __aarch64__ )
+			if ( char * cursor = strstr( dcursor, ".4byte\t.LASF" ) ) { // language code ?
+//				fprintf( stderr, ".4byte\t.LASF\n" );
+#else
+	#error unsupported architecture
+#endif
+				for ( int i = 0; i < 2; i += 1 ) {		// move N (magic) lines forward
+					cursor = strstr( cursor, "\n" ) + 1;
+				} // for
+				cursor -= 2;							// backup over "d\n", where d is a hex digit
+				// From elfcpp/dwarf.h in the binutils source tree.
+				// DW_LANG_C89 = 0x1, DW_LANG_C = 0x2, DW_LANG_C99 = 0xc, DW_LANG_C11 = 0x1d
+				if ( *(cursor - 2) == '0' && *(cursor - 1) == 'x' &&
+					 (*cursor == 'c' || *cursor == '1' || *cursor == '2') ) { // C99/C89/C
+					fprintf( stderr, "language code %c\n", *cursor );
+					// Expand file by one byte to hold 2 character Cforall language code.
+					if ( ftruncate( fd, size + 1 ) ) { perror( "ftruncate" ); exit( EXIT_FAILURE ); };
+					memmove( cursor + 2, cursor + 1, start + size - cursor - 1 ); // move remaining text 1 character right
+				} else if ( *(cursor - 3) == '0' && *(cursor - 2) == 'x' && *(cursor - 1) == '1' && *cursor == 'd' ) { // C11
+				} else {
+					for ( int i = 0; i < 6; i += 1 ) {	// move N (magic) lines forward
+						cursor = strstr( cursor, "\n" ) + 1;
+					} // for
+					fprintf( stderr, "*** ERROR *** Invalid C language code found in assembler file: %s\n"
+							 "Assembler debug information:\n%.*s",
+							 argv[argc - 1], (int)(cursor - dcursor), dcursor );
+					exit( EXIT_FAILURE );
+				} // if
 
-	// 		if ( char * cursor = strstr( dcursor, ".long\t.LASF" ) ) { // language code ?
-	// 			for ( int i = 0; i < 2; i += 1 ) {		// move N (magic) lines forward
-	// 				cursor = strstr( cursor, "\n" ) + 1;
-	// 			} // for
-	// 			cursor -= 2;							// backup over "d\n", where d is a hex digit
-	// 			// From elfcpp/dwarf.h in the binutils source tree.
-	// 			// DW_LANG_C89 = 0x1, DW_LANG_C = 0x2, DW_LANG_C99 = 0xc, DW_LANG_C11 = 0x1d
-	// 			if ( *(cursor - 2) == '0' && *(cursor - 1) == 'x' &&
-	// 				 (*cursor == 'c' || *cursor == '1' || *cursor == '2') ) { // C99/C89/C
-	// 				// Expand file by one byte to hold 2 character Cforall language code.
-	// 				if ( ftruncate( fd, size + 1 ) ) { perror( "ftruncate" ); exit( EXIT_FAILURE ); };
-	// 				memmove( cursor + 2, cursor + 1, start + size - cursor - 1 ); // move remaining text 1 character right
-	// 			} else if ( *(cursor - 3) == '0' && *(cursor - 2) == 'x' && *(cursor - 1) == '1' && *cursor == 'd' ) { // C11
-	// 			} else {
-	// 				for ( int i = 0; i < 6; i += 1 ) {	// move N (magic) lines forward
-	// 					cursor = strstr( cursor, "\n" ) + 1;
-	// 				} // for
-	// 				fprintf( stderr, "*** ERROR *** Invalid C language code found in assembler file: %s\n"
-	// 						 "Assembler debug information:\n%.*s",
-	// 						 argv[argc - 1], (int)(cursor - dcursor), dcursor );
-	// 				exit( EXIT_FAILURE );
-	// 			} // if
+				*(cursor - 1) = '2';					// replace C89/C/C99/C11 language code with CFA code
+				*cursor = '5';
+			} // if
+		} // if
 
-	// 			*(cursor - 1) = '2';					// replace C89/C/C99/C11 language code with CFA code
-	// 			*cursor = '5';
-	// 		} // if
-	// 	} // if
-
-	// 	if ( munmap( start, size + 2 ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk
-	// } // if
+		if ( munmap( start, size + 2 ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk
+	} // if
 
 	argv[0] = "as";
