diff src/output.c @ 86:033a328a10ae

Checkpoint: object target output
author lost
date Fri, 16 Jan 2009 05:33:40 +0000
parents 918be0c02239
children 41ff4686b46b
line wrap: on
line diff
--- a/src/output.c	Fri Jan 16 05:14:49 2009 +0000
+++ b/src/output.c	Fri Jan 16 05:33:40 2009 +0000
@@ -241,7 +241,15 @@
 			// relocation table
 			if (l -> relocoff >= 0)
 			{
-			
+				section_reloc_list_t *re;
+				
+				// build the relocation reference for the linker
+				re = lwasm_alloc(sizeof(section_reloc_list_t));
+				re -> next = l -> sect -> rl;
+				l -> sect -> rl = re;
+				
+				re -> offset = l -> codeaddr + l -> relocoff;
+				re -> expr = l -> exprs[0];
 			}
 		}
 	}