# HG changeset patch # User lost@l-w.ca # Date 1314666318 21600 # Node ID 872fa82680e1b27f2bd12ea0496a6aa4119d6dec # Parent 324f28905144da13e12869fff9014df0ad3efdca Make multiple instances of constant sections all start at offset 0 rather than merging them diff -r 324f28905144 -r 872fa82680e1 lwasm/section.c --- 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);