changeset 202:1a75121c3c3f

Yet again try to get importing undefined exports working
author lost
date Sun, 22 Mar 2009 21:20:45 +0000
parents 7824f94c5786
children 2c1afbdb2de0
files lwasm/pseudo.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/pseudo.c	Sun Mar 22 20:07:37 2009 +0000
+++ b/lwasm/pseudo.c	Sun Mar 22 21:20:45 2009 +0000
@@ -1082,7 +1082,7 @@
 	// the symbol better be defined at this point (pass 2)
 	// local symbols cannot be exported nor can "global" symbols
 	se = lwasm_find_symbol(as, l -> sym, -1);
-	if (!se && (as -> pragmas & PRAGMA_IMPORTUNDEFEXPORT))
+	if ((!se || (se -> flags & SYMBOL_EXTERN)) && (as -> pragmas & PRAGMA_IMPORTUNDEFEXPORT))
 	{
 		void *p;
 		p = as -> csect;
@@ -1136,6 +1136,7 @@
 		ex -> offset = se -> value;
 		ex -> sym = lwasm_strdup(se -> sym);
 	}
+next:
 	if (after == 1)
 	{
 		if (**p == ',')