diff lwasm/lwasm.h @ 374:d99322ef6f21

Stage 1: actually do output
author lost@starbug
date Sat, 24 Apr 2010 14:15:18 -0600
parents 90de73ba0cac
children 3498b2d88376
line wrap: on
line diff
--- a/lwasm/lwasm.h	Thu Apr 22 18:30:30 2010 -0600
+++ b/lwasm/lwasm.h	Sat Apr 24 14:15:18 2010 -0600
@@ -84,12 +84,25 @@
 	section_flag_none = 0				// no flags
 };
 
+typedef struct reloctab_s reloctab_t;
+struct reloctab_s
+{
+	int offset;							// offset of relocation
+	int size;							// size of relocation
+	lw_expr_t *expr;					// relocation expression
+	reloctab_t *next;
+};
+
 typedef struct sectiontab_s sectiontab_t;
 struct sectiontab_s
 {
 	char *name;							// section name
 	int flags;							// section flags;
 	lw_expr_t offset;					// offset for next instance
+	int oblen;							// size of section output
+	int obsize;							// size of output buffer
+	unsigned char *obytes;				// output buffer
+	reloctab_t *reloctab;				// table of relocations
 	sectiontab_t *next;
 };
 
@@ -113,6 +126,7 @@
 struct exportlist_s
 {
 	char *symbol;						// symbol to export
+	struct symtabe *se;					// symbol table entry
 	line_t *line;						// line the export is on
 	exportlist_t *next;					// next in the export list
 };
@@ -163,6 +177,7 @@
 	int context;						// symbol context (-1 for global)
 	int version;						// version of the symbol (for "set")
 	int flags;							// flags for the symbol
+	sectiontab_t *section;				// section the symbol is defined in
 	lw_expr_t value;					// symbol value
 	struct symtabe *next;				// next symbol in the table
 };