comparison 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
comparison
equal deleted inserted replaced
166:324f28905144 167:872fa82680e1
136 } 136 }
137 s -> next = as -> sections; 137 s -> next = as -> sections;
138 as -> sections = s; 138 as -> sections = s;
139 } 139 }
140 140
141 // cause all instances of "constant" sections to start at 0
142 if (s -> flags & section_flag_constant)
143 s -> offset = 0;
141 lw_expr_destroy(l -> addr); 144 lw_expr_destroy(l -> addr);
142 l -> addr = lw_expr_copy(s -> offset); 145 l -> addr = lw_expr_copy(s -> offset);
143 lw_expr_destroy(l -> daddr); 146 lw_expr_destroy(l -> daddr);
144 l -> daddr = lw_expr_copy(s -> offset); 147 l -> daddr = lw_expr_copy(s -> offset);
145 as -> csect = s; 148 as -> csect = s;