Mercurial > hg > index.cgi
diff lwasm/section.c @ 156:fc8386b13399
Added 'constant' sections to object file handling for lwasm and lwlink
author | lost@l-w.ca |
---|---|
date | Sun, 28 Aug 2011 02:06:42 -0600 |
parents | 5ac1c4cd81a7 |
children | 409295d09a2e |
line wrap: on
line diff
--- a/lwasm/section.c Sun Aug 28 00:07:15 2011 -0600 +++ b/lwasm/section.c Sun Aug 28 02:06:42 2011 -0600 @@ -98,6 +98,11 @@ { s -> flags |= section_flag_bss; } + if (!strcasecmp(sn, "_constant")) + { + s -> flags |= section_flag_constant; + } + // parse options if (opts) { @@ -110,6 +115,14 @@ { s -> flags &= ~section_flag_bss; } + else if (!strcasecmp(opts, "constant")) + { + s -> flags |= section_flag_constant; + } + else if (!strcasecmp(opts, "!constant")) + { + s -> flags |= section_flag_constant; + } else { lwasm_register_error(as, l, "Unrecognized section flag");