diff lwlink/trunk/src/script.c @ 121:7bc853cb2ca9

Added simplistic output module for DECB target
author lost
date Thu, 22 Jan 2009 02:05:08 +0000
parents 8bc00221ae89
children 4ac96c697ef0
line wrap: on
line diff
--- a/lwlink/trunk/src/script.c	Wed Jan 21 06:14:08 2009 +0000
+++ b/lwlink/trunk/src/script.c	Thu Jan 22 02:05:08 2009 +0000
@@ -39,6 +39,7 @@
 	"section code\n"
 	"section *,!bss\n"
 	"section *,bss\n"
+	"entry 2000\n"
 	;
 
 // the built-in RAW target linker script
@@ -158,6 +159,22 @@
 			if (linkscript.padsize < 0)
 				linkscript.padsize = 0;
 		}
+		else if (!strcmp(line, "entry"))
+		{
+			int eaddr;
+			
+			eaddr = strtol(ptr, &ptr2, 16);
+			if (*ptr2)
+			{
+				linkscript.execaddr = -1;
+				linkscript.execsym = lw_strdup(ptr);
+			}
+			else
+			{
+				linkscript.execaddr = eaddr;
+				linkscript.execsym = NULL;
+			}
+		}
 		else if (!strcmp(line, "section"))
 		{
 			// section