diff src/lwasm.h @ 75:92eb93bffa28

Rejigged symbol system to be able to handle non-constant references
author lost
date Thu, 08 Jan 2009 01:32:49 +0000
parents c8c772ef5df9
children 2fe5fd7d65a3
line wrap: on
line diff
--- a/src/lwasm.h	Thu Jan 08 01:18:40 2009 +0000
+++ b/src/lwasm.h	Thu Jan 08 01:32:49 2009 +0000
@@ -85,19 +85,22 @@
 	// references, and intrasection relocations
 	int relocoff;		// offset into insn where relocation value goes
 	// the incomplete reference expression
-	struct lwasm_expr_strack_t *expr;
+	lwasm_expr_stack_t *expr;
 };
 
 // for keeping track of symbols
-#define	SYMBOL_SET	1	// the symbol was used for "SET"
-#define SYMBOL_NORM	0	// no flags
+#define	SYMBOL_SET		1	// the symbol was used for "SET"
+#define SYMBOL_COMPLEX	2	// register symbol as a complex symbol (from l -> expr)
+#define SYMBOL_NORM		0	// no flags
 typedef struct lwasm_symbol_ent_s lwasm_symbol_ent_t;
 struct lwasm_symbol_ent_s
 {
-	char *sym;			// the symbol
-	int context;		// the context number of the symbol (-1 for global)
-	int value;			// the value of the symbol
-	int flags;			// flags for the symbol
+	char *sym;					// the symbol
+	int context;				// the context number of the symbol (-1 for global)
+	int value;					// the value of the symbol
+	int flags;					// flags for the symbol
+	sectiontab_t *sect;			// the section the symbol exists in; NULL for none
+	lwasm_expr_stack_t *expr;	// expression for a symbol that is not constant NULL for const
 	lwasm_symbol_ent_t *next;	// next symbol in the table
 	lwasm_symbol_ent_t *prev;	// previous symbol in the table
 };