aboutsummaryrefslogtreecommitdiff
path: root/ld/ldwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldwrite.c')
-rw-r--r--ld/ldwrite.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/ld/ldwrite.c b/ld/ldwrite.c
index 8367075..a41a0e9 100644
--- a/ld/ldwrite.c
+++ b/ld/ldwrite.c
@@ -251,10 +251,7 @@ build_link_order (lang_statement_union_type *statement)
link_order->u.indirect.section = i;
ASSERT (i->output_section == output_section);
}
- if (i->_cooked_size)
- link_order->size = i->_cooked_size;
- else
- link_order->size = bfd_get_section_size (i);
+ link_order->size = i->size;
link_order->offset = i->output_offset;
}
}
@@ -368,8 +365,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
n->vma = s->vma;
n->user_set_vma = s->user_set_vma;
n->lma = s->lma;
- n->_cooked_size = 0;
- n->_raw_size = 0;
+ n->size = 0;
n->output_offset = s->output_offset;
n->output_section = n;
n->orelocation = 0;
@@ -383,7 +379,7 @@ static void
ds (asection *s)
{
struct bfd_link_order *l = s->link_order_head;
- printf ("vma %x size %x\n", s->vma, s->_raw_size);
+ printf ("vma %x size %x\n", s->vma, s->size);
while (l)
{
if (l->type == bfd_indirect_link_order)
@@ -469,10 +465,7 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
if (info->relocatable)
thisrelocs = sec->reloc_count;
- if (sec->_cooked_size != 0)
- thissize = sec->_cooked_size;
- else
- thissize = sec->_raw_size;
+ thissize = sec->size;
}
else if (info->relocatable
@@ -507,13 +500,8 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
dump ("before snip", cursor, n);
shift_offset = p->offset;
- if (cursor->_cooked_size != 0)
- {
- n->_cooked_size = cursor->_cooked_size - shift_offset;
- cursor->_cooked_size = shift_offset;
- }
- n->_raw_size = cursor->_raw_size - shift_offset;
- cursor->_raw_size = shift_offset;
+ n->size = cursor->size - shift_offset;
+ cursor->size = shift_offset;
vma += shift_offset;
n->lma = n->vma = vma;