220 |
for (s=b->sections;s;s=s->next) { |
for (s=b->sections;s;s=s->next) { |
221 |
|
|
222 |
s->owner=b; |
s->owner=b; |
223 |
s->output_section=s; |
s->output_section=(s->flags & SEC_ALLOC) ? s : b->sections; |
224 |
s->output_offset=0; |
s->output_offset=0; |
225 |
|
|
226 |
if (!(s->flags & SEC_ALLOC) || !(s->flags & SEC_LOAD)) |
if (!(s->flags & SEC_ALLOC)) |
227 |
continue; |
continue; |
228 |
|
|
229 |
if (max_align<s->alignment_power) |
if (max_align<s->alignment_power) |
256 |
continue; |
continue; |
257 |
|
|
258 |
m=round_up(m,1<<s->alignment_power); |
m=round_up(m,1<<s->alignment_power); |
259 |
s->vma=(bfd_vma)m; |
s->output_section->vma=(bfd_vma)m; |
260 |
m+=s->_raw_size; |
m+=s->_raw_size; |
261 |
|
|
262 |
} |
} |
290 |
} |
} |
291 |
|
|
292 |
for (s=b->sections;s;s=s->next) { |
for (s=b->sections;s;s=s->next) { |
293 |
if (!(s->flags & SEC_ALLOC) || !(s->flags & SEC_LOAD)) |
|
294 |
|
if (!(s->flags & SEC_LOAD)) |
295 |
continue; |
continue; |
296 |
|
|
297 |
link_order.u.indirect.section=s; |
link_order.u.indirect.section=s; |
299 |
/* s->orelocation=alloca(2*bfd_get_reloc_upper_bound (b, s)); */ |
/* s->orelocation=alloca(2*bfd_get_reloc_upper_bound (b, s)); */ |
300 |
|
|
301 |
if (!bfd_get_relocated_section_contents(b,&link_info,&link_order, |
if (!bfd_get_relocated_section_contents(b,&link_info,&link_order, |
302 |
(void *)s->vma,0,q)) |
(void *)s->output_section->vma,0,q)) |
303 |
FEerror("Cannot get relocated section contents\n"); |
FEerror("Cannot get relocated section contents\n"); |
304 |
|
|
305 |
} |
} |