diff lwlink/lwlink.h @ 234:d389adbcc4ab

Added section base and length symbols to lwlink Added the ability for a link script to define section base and section length symbols when linking. These symbols are searched for when an external reference is resolved before looking up any symbols in the various objects being linked. Also documented the new link script directives and added such directives to all default link scripts.
author William Astle <lost@l-w.ca>
date Fri, 10 Aug 2012 23:47:56 -0600
parents c6a38fd8bd33
children ce1fdc8d6568
line wrap: on
line diff
--- a/lwlink/lwlink.h	Thu Jul 19 13:17:30 2012 -0600
+++ b/lwlink/lwlink.h	Fri Aug 10 23:47:56 2012 -0600
@@ -157,10 +157,24 @@
 	int modattr;				// module attributes
 	int modrev;					// module revision
 	char *name;					// module name
+	char *basesympat;			// pattern for section base symbol (%s for section name)
+	char *lensympat;			// pattern for section length symbol (%s for section name)
 } linkscript_t;
 
 #ifndef __script_c_seen__
 extern linkscript_t linkscript;
 #endif
 
+typedef struct symlist_s symlist_t;
+
+struct symlist_s
+{
+	char *sym;
+	int val;
+	symlist_t *next;
+	
+};
+
+extern symlist_t *symlist;
+
 #endif //__lwlink_h_seen__