diff src/main.c @ 299:460d96987670

parse linking scripts
author lost
date Wed, 21 Jan 2009 04:54:32 +0000
parents c52ad3135bd3
children 48945dac8178
line wrap: on
line diff
--- a/src/main.c	Wed Jan 21 03:15:49 2009 +0000
+++ b/src/main.c	Wed Jan 21 04:54:32 2009 +0000
@@ -46,6 +46,11 @@
 		outfile = arg;
 		break;
 	
+	case 's':
+		// script file
+		scriptfile = arg;
+		break;
+
 	case 'd':
 		// debug
 		debug_level++;
@@ -101,6 +106,8 @@
 				"Generate DECB .bin format output, equivalent of --format=decb"},
 	{ "raw",		'r',	0,		0,
 				"Generate raw binary format output, equivalent of --format=raw"},
+	{ "script",		's',	0,		0,
+				"Specify the linking script (overrides the build in defaults)"},
 	{ 0 }
 };
 
@@ -113,6 +120,7 @@
 };
 
 extern void read_files(void);
+extern void setup_script(void);
 
 // main function; parse command line, set up assembler state, and run the
 // assembler on the first file
@@ -125,6 +133,8 @@
 		exit(1);
 	}
 
+	setup_script();
+
 	// read the input files
 	read_files();