Mercurial > hg > index.cgi
diff lwasm/section.c @ 167:872fa82680e1
Make multiple instances of constant sections all start at offset 0 rather than merging them
author | lost@l-w.ca |
---|---|
date | Mon, 29 Aug 2011 19:05:18 -0600 |
parents | 409295d09a2e |
children | 35f7ce3ef857 |
line wrap: on
line diff
--- a/lwasm/section.c Mon Aug 29 18:30:55 2011 -0600 +++ b/lwasm/section.c Mon Aug 29 19:05:18 2011 -0600 @@ -138,6 +138,9 @@ as -> sections = s; } + // cause all instances of "constant" sections to start at 0 + if (s -> flags & section_flag_constant) + s -> offset = 0; lw_expr_destroy(l -> addr); l -> addr = lw_expr_copy(s -> offset); lw_expr_destroy(l -> daddr);