diff src/lwasm.h @ 86:033a328a10ae

Checkpoint: object target output
author lost
date Fri, 16 Jan 2009 05:33:40 +0000
parents 918be0c02239
children 6097cb1486f8
line wrap: on
line diff
--- a/src/lwasm.h	Fri Jan 16 05:14:49 2009 +0000
+++ b/src/lwasm.h	Fri Jan 16 05:33:40 2009 +0000
@@ -33,6 +33,14 @@
 #define OUTPUT_RAWREL	3	// raw bytes where ORG causes a SEEK in the file
 
 // structure for tracking sections
+typedef struct section_reloc_list_s section_reloc_list_t;
+struct section_reloc_list_s
+{
+	int offset;						// offset into section
+	lwasm_expr_stack_t *expr;		// value definition
+	section_reloc_list_t *next;		// next relocation
+};
+
 #define SECTION_BSS		1	// the section contains no actual code - just uninit vars
 typedef struct sectiontab_s sectiontab_t;
 struct sectiontab_s
@@ -41,9 +49,11 @@
 	int offset;				// current offset in the section
 	int flags;				// section flags
 	sectiontab_t *next;		// next section
+	// the following are used during code output
 	unsigned char *obytes;	// output bytes
 	int oblen;				// how many bytes output so far?
 	int obsize;				// how big is output buffer so far?
+	section_reloc_list_t *rl;	// relocation list
 };
 
 // structure for tracking macros