diff lwasm/lwasm.c @ 375:3498b2d88376

Added export list to object output
author lost@starbug
date Mon, 26 Apr 2010 17:14:04 -0600
parents d99322ef6f21
children 91c0fe026940
line wrap: on
line diff
--- a/lwasm/lwasm.c	Sat Apr 24 14:15:18 2010 -0600
+++ b/lwasm/lwasm.c	Mon Apr 26 17:14:04 2010 -0600
@@ -35,6 +35,16 @@
 
 void lwasm_register_error(asmstate_t *as, line_t *l, const char *msg, ...);
 
+int lwasm_expr_exportable(asmstate_t *as, lw_expr_t expr)
+{
+	return 0;
+}
+
+int lwasm_expr_exportval(asmstate_t *as, lw_expr_t expr)
+{
+	return 0;
+}
+
 lw_expr_t lwasm_evaluate_var(char *var, void *priv)
 {
 	asmstate_t *as = (asmstate_t *)priv;
@@ -87,6 +97,14 @@
 {
 	switch (t)
 	{
+	case lwasm_expr_secbase:
+		{
+			line_t *cl = ptr;
+			if (cl -> as -> exportcheck && ptr == cl -> as -> csect)
+				return lw_expr_build(lw_expr_type_int, 0);
+			return NULL;
+		}
+			
 	case lwasm_expr_linelen:
 		{
 			line_t *cl = ptr;