Mercurial > hg-old > index.cgi
diff lwasm/output.c @ 243:f9f01a499525 2.x
Added zero-width external references
author | lost |
---|---|
date | Tue, 15 Sep 2009 03:16:17 +0000 |
parents | a58f49a77441 |
children |
line wrap: on
line diff
--- a/lwasm/output.c Sun Aug 16 18:34:13 2009 +0000 +++ b/lwasm/output.c Tue Sep 15 03:16:17 2009 +0000 @@ -352,6 +352,16 @@ // now output the "incomplete references" // this being the most complex bit + for (i = 0; i < as -> nextdeps; i++) + { + // flag 0-width reference + writebytes("\xFF\x02", 2, 1, of); + // write external symbol ref + writebytes("\x02", 1, 1, of); + writebytes(as -> extdeps[i], strlen(as -> extdeps[i]) + 1, 1, of); + // flag end of expr & offset 0 - the 3 is not an error + writebytes("\0\0", 3, 1, of); + } for (re = s -> rl; re; re = re -> next) { if (re -> expr == NULL)