# HG changeset patch # User lost@l-w.ca # Date 1314562570 21600 # Node ID 8dead67ba6070d350c767f8fc14baf5238413e42 # Parent 4682460aed00aee07758ac4d392967f032f158da Make constant sections always resolve with a constant base offset of zero instead of an undefined reference diff -r 4682460aed00 -r 8dead67ba607 lwasm/lwasm.c --- a/lwasm/lwasm.c Sun Aug 28 11:45:38 2011 -0600 +++ b/lwasm/lwasm.c Sun Aug 28 14:16:10 2011 -0600 @@ -102,6 +102,8 @@ asmstate_t *as = priv; if (as -> exportcheck && ptr == as -> csect) return lw_expr_build(lw_expr_type_int, 0); + if (((sectiontab_t *)ptr) -> flags & section_flag_constant) + return lw_expr_build(lw_expr_type_int, 0); return NULL; }